Changeset 6417 for 2015


Ignore:
Timestamp:
2015-06-26 04:45:55 (8 years ago)
Author:
mijoliim
Message:
 
Location:
2015/26/MikkoL/JRPG
Files:
11 edited

Legend:

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

    r6415 r6417  
    431431    void EndBattle() 
    432432    { 
    433  
     433        Flags.InBattle = false; 
     434 
     435        IsTimerActive = false; 
     436        IsAttackAnimationPlaying = true; 
     437        IsInMenu = true; 
     438 
     439        JRPG.Game.FadeMusicOut(); 
     440 
     441        int totalExp = _EnemyGroup.Sum(E => E.ExperiencePoints); 
     442 
     443        DialogBox DialogBox = new DialogBox(); 
     444        DialogBox.SetTextBase(JRPG.Game.MainFont, TextAlignment.Center); 
     445        DialogBox.TextPosition = new Vector(0, 224 + 100); 
     446        DialogBox.TextBox.Y += 550; 
     447        DialogBox.DrawIconBox = false; 
     448        DialogBox.WriteRow(" "); 
     449        DialogBox.WriteRow("You got " + totalExp.ToString() + " experience points!"); 
     450        DialogBox.DrawDialogBox(); 
     451 
     452        DialogBox.OnExiting += delegate 
     453        { 
     454            JRPG.Game.FadeOut(); 
     455            Timer.SingleShot(1, DestroyAndLeaveBattle); 
     456        }; 
     457    } 
     458 
     459    void DestroyAndLeaveBattle() 
     460    { 
    434461        Flags.InBattle = false; 
    435462 
     
    451478 
    452479        JRPG.Game.ClearControls(); 
    453          
     480 
    454481 
    455482        JRPG.Game.LoadOWControlsKeyboard(); 
     
    459486 
    460487        JRPG.Game.FadeMusicOut(); 
     488        JRPG.Game.FadeIn(); 
    461489        Timer.SingleShot(0.5, delegate { JRPG.Game.FadeMusicIn("Music//WildArms"); }); 
    462490    } 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/Characters/CharacterList.cs

    r6416 r6417  
    1313        Sonic.Name = "Sonic"; 
    1414        Sonic.CurrentStats.HP = 82; 
    15         Sonic.CurrentStats.Str = 20; 
     15        Sonic.CurrentStats.Str = 200; 
    1616        Sonic.CurrentStats.Def = 10; 
    1717        Sonic.CurrentStats.Luck = 20; 
     18        Sonic.CurrentStats.Spd = 500; 
    1819 
    1920        Sonic.ResetHPMeter(); 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/EnemyBase/EnemyBase.cs

    r6304 r6417  
    1414    public List<SkillBase> Skills = new List<SkillBase>(); 
    1515    public int FleePercent { get; set; } 
     16    public int ExperiencePoints = 10; 
    1617 
    1718    public double BaseWaitTimeInSeconds = 1.5; 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/MainGame.cs

    r6416 r6417  
    154154        Player.Color = Jypeli.Color.Blue; 
    155155        Add(Player); 
     156        SetAnimations(); 
     157    } 
     158    public void SetAnimations() 
     159    { 
     160        if (Movement.FacingDir == Movement.Direction.Up && JRPG.Game.Keyboard.GetKeyState(Key.Up) == ButtonState.Pressed && !Movement.IsMoving) 
     161        { 
     162            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingUp); 
     163            Player.Animation.FPS = 10; 
     164            Player.Animation.Start(); 
     165        } 
     166        else if (Movement.FacingDir == Movement.Direction.Down && JRPG.Game.Keyboard.GetKeyState(Key.Down) == ButtonState.Pressed && !Movement.IsMoving) 
     167        { 
     168            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingDown); 
     169            Player.Animation.FPS = 10; 
     170            Player.Animation.Start(); 
     171        } 
     172        else if (Movement.FacingDir == Movement.Direction.Left && JRPG.Game.Keyboard.GetKeyState(Key.Left) == ButtonState.Pressed && !Movement.IsMoving) 
     173        { 
     174            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingLeft); 
     175            Player.Animation.FPS = 10; 
     176            Player.Animation.Start(); 
     177        } 
     178        else if (Movement.FacingDir == Movement.Direction.Right && JRPG.Game.Keyboard.GetKeyState(Key.Right) == ButtonState.Pressed && !Movement.IsMoving) 
     179        { 
     180            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingRight); 
     181            Player.Animation.FPS = 10; 
     182            Player.Animation.Start(); 
     183        } 
     184        else if (Movement.FacingDir == Movement.Direction.Up && JRPG.Game.Keyboard.GetKeyState(Key.Up) == ButtonState.Down && !Movement.IsMoving) 
     185        { 
     186            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingUp); 
     187            Player.Animation.FPS = 10; 
     188            Player.Animation.Start(); 
     189        } 
     190        else if (Movement.FacingDir == Movement.Direction.Down && JRPG.Game.Keyboard.GetKeyState(Key.Down) == ButtonState.Down && !Movement.IsMoving) 
     191        { 
     192            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingDown); 
     193            Player.Animation.FPS = 10; 
     194            Player.Animation.Start(); 
     195        } 
     196        else if (Movement.FacingDir == Movement.Direction.Left && JRPG.Game.Keyboard.GetKeyState(Key.Left) == ButtonState.Down && !Movement.IsMoving) 
     197        { 
     198            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingLeft); 
     199            Player.Animation.FPS = 10; 
     200            Player.Animation.Start(); 
     201        } 
     202        else if (Movement.FacingDir == Movement.Direction.Right && JRPG.Game.Keyboard.GetKeyState(Key.Right) == ButtonState.Down && !Movement.IsMoving) 
     203        { 
     204            Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingRight); 
     205            Player.Animation.FPS = 10; 
     206            Player.Animation.Start(); 
     207        } 
     208        else if (Movement.FacingDir == Movement.Direction.Up && !Movement.IsMoving) 
     209        { 
     210            Player.Animation = null; 
     211            Player.Image = Images.Characters.Overworld.Sonic_Standing_Up; 
     212        } 
     213        else if (Movement.FacingDir == Movement.Direction.Down && !Movement.IsMoving) 
     214        { 
     215            Player.Animation = null; 
     216            Player.Image = Images.Characters.Overworld.Sonic_Standing_Down; 
     217        } 
     218        else if (Movement.FacingDir == Movement.Direction.Left && !Movement.IsMoving) 
     219        { 
     220            Player.Animation = null; 
     221            Player.Image = Images.Characters.Overworld.Sonic_Standing_Left; 
     222        } 
     223        else if (Movement.FacingDir == Movement.Direction.Right && !Movement.IsMoving) 
     224        { 
     225            Player.Animation = null; 
     226            Player.Image = Images.Characters.Overworld.Sonic_Standing_Right; 
     227        } 
    156228    } 
    157229 
     
    317389    #endregion 
    318390 
    319     public void SetAnimations() 
    320     { 
    321         if (Movement.FacingDir == Movement.Direction.Up && JRPG.Game.Keyboard.GetKeyState(Key.Up) == ButtonState.Pressed && !Movement.IsMoving) 
    322         { 
    323             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingUp); 
    324             Player.Animation.Start(); 
    325         } 
    326         else if (Movement.FacingDir == Movement.Direction.Down && JRPG.Game.Keyboard.GetKeyState(Key.Down) == ButtonState.Pressed && !Movement.IsMoving) 
    327         { 
    328             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingDown); 
    329             Player.Animation.Start(); 
    330         } 
    331         else if (Movement.FacingDir == Movement.Direction.Left && JRPG.Game.Keyboard.GetKeyState(Key.Left) == ButtonState.Pressed && !Movement.IsMoving) 
    332         { 
    333             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingLeft); 
    334             Player.Animation.Start(); 
    335         } 
    336         else if (Movement.FacingDir == Movement.Direction.Right && JRPG.Game.Keyboard.GetKeyState(Key.Right) == ButtonState.Pressed && !Movement.IsMoving) 
    337         { 
    338             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingRight); 
    339             Player.Animation.Start(); 
    340         } 
    341         else if (Movement.FacingDir == Movement.Direction.Up && JRPG.Game.Keyboard.GetKeyState(Key.Up) == ButtonState.Down && !Movement.IsMoving) 
    342         { 
    343             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingUp); 
    344             Player.Animation.Start(); 
    345         } 
    346         else if (Movement.FacingDir == Movement.Direction.Down && JRPG.Game.Keyboard.GetKeyState(Key.Down) == ButtonState.Down && !Movement.IsMoving) 
    347         { 
    348             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingDown); 
    349             Player.Animation.Start(); 
    350         } 
    351         else if (Movement.FacingDir == Movement.Direction.Left && JRPG.Game.Keyboard.GetKeyState(Key.Left) == ButtonState.Down && !Movement.IsMoving) 
    352         { 
    353             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingLeft); 
    354             Player.Animation.Start(); 
    355         } 
    356         else if (Movement.FacingDir == Movement.Direction.Right && JRPG.Game.Keyboard.GetKeyState(Key.Right) == ButtonState.Down && !Movement.IsMoving) 
    357         { 
    358             Player.Animation = new Animation(Images.Characters.Overworld.Sonic_WalkingRight); 
    359             Player.Animation.Start(); 
    360         } 
    361         else if (Movement.FacingDir == Movement.Direction.Up && !Movement.IsMoving) 
    362         { 
    363             Player.Animation = null; 
    364             Player.Image = Images.Characters.Overworld.Sonic_Standing_Up; 
    365         } 
    366         else if (Movement.FacingDir == Movement.Direction.Down && !Movement.IsMoving) 
    367         { 
    368             Player.Animation = null; 
    369             Player.Image = Images.Characters.Overworld.Sonic_Standing_Down; 
    370         } 
    371         else if (Movement.FacingDir == Movement.Direction.Left && !Movement.IsMoving) 
    372         { 
    373             Player.Animation = null; 
    374             Player.Image = Images.Characters.Overworld.Sonic_Standing_Left; 
    375         } 
    376         else if (Movement.FacingDir == Movement.Direction.Right && !Movement.IsMoving) 
    377         { 
    378             Player.Animation = null; 
    379             Player.Image = Images.Characters.Overworld.Sonic_Standing_Right; 
    380         } 
    381         /* 
    382         if (Player.Animation.FPS != 5) 
    383         { 
    384             Player.Animation.FPS = 5; 
    385         }*/ 
    386     } 
     391 
    387392 
    388393    public void FadeOut() 
Note: See TracChangeset for help on using the changeset viewer.