- Timestamp:
- 2015-06-25 11:51:34 (8 years ago)
- Location:
- 2015/26/MikkoL
- Files:
-
- 28 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/AttackList.cs
r6305 r6341 19 19 20 20 return Attack; 21 } 22 23 public static AttackBase Kick() 24 { 25 AttackBase Kick = new AttackBase(); 26 Kick.Name = "attack"; 27 Kick.DMG = 5; 28 Kick.LearnAtLevel = 1; 29 30 Kick.OnUse = delegate 31 { 32 BattleView.CurrentBattleView.SelectSingleEnemyForAttackTarget(AttackList.Kick()); 33 }; 34 35 Kick.Animation = delegate(CharacterBase character) 36 { 37 character.AllyOnScreen.MoveTo(character.AllyOnScreen.Position + new Vector(-50, 0), 400, delegate 38 { 39 character.AllyOnScreen.Animation.Start(1); 40 Timer.SingleShot(1, 41 delegate 42 { 43 character.AllyOnScreen.MoveTo(character.AllyOnScreen.Position + new Vector(50, 0), 400, 44 delegate 45 { 46 BattleView.CurrentBattleView.IsAttackAnimationPlaying = false; 47 BattleView.CurrentBattleView.IsTimerActive = true; 48 49 }); 50 }); 51 }); 52 53 }; 54 55 return Kick; 21 56 } 22 57 … … 65 100 66 101 public Action OnUse { get; set; } 67 public Action Animation { get; set; }102 public Action<CharacterBase> Animation { get; set; } 68 103 } -
2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/BattleView.cs
r6319 r6341 70 70 JRPG.Game.Keyboard.Listen(Key.Enter, ButtonState.Pressed, EndBattle, null); 71 71 72 Allies.Add(CharacterList.TestChar()); 73 Allies.Add(CharacterList.TestChar()); 74 Allies.Add(CharacterList.TestChar()); 72 Allies.Add(CharacterList.Sonic()); 75 73 76 74 for (int i = 0; i < Allies.Count; i++) … … 79 77 } 80 78 79 LoadAllies(); 81 80 LoadEnemies(_Enemies); 82 81 LoadHUD(); … … 84 83 Flags.InBattle = true; 85 84 IsTimerActive = true; 85 } 86 87 void LoadAllies() 88 { 89 for (int i = 0; i < Allies.Count; i++) 90 { 91 Allies[i].AllyOnScreen = new GameObject(Allies[i].Idle.Width, Allies[i].Idle.Height); 92 Allies[i].AllyOnScreen.Animation = Allies[i].Animation; 93 //Allies[i].AllyOnScreen.Image = Allies[i].Idle; 94 95 96 if (Allies.Count == 1) 97 { 98 Allies[i].AllyOnScreen.Position = JRPG.Game.Camera.Position + new Vector(240, 0); 99 } 100 101 JRPG.Game.Add(Allies[i].AllyOnScreen, 2); 102 } 86 103 } 87 104 … … 261 278 AllyNames[_AllyQueue.Peek().Index].IsFlashing = false; 262 279 AllyNames[_AllyQueue.Peek().Index].TextColor = Microsoft.Xna.Framework.Color.White; 263 280 281 CharacterBase CurrentAlly = _AllyQueue.Dequeue(); 282 264 283 ActionQueue.Enqueue(delegate 265 284 { 266 IsAttackAnimationPlaying = false; 267 IsTimerActive = true; 268 269 DamageHitsplat(EnemiesOnScreen[SelectedEnemy].Position - JRPG.Game.Camera.Position, TrueDamage, Crit); 270 Enemies[SelectedEnemy].Stats.HP -= TrueDamage; 271 272 if (Enemies[SelectedEnemy].Stats.HP <= 0) 285 if (ATK.Animation != null) 273 286 { 274 Enemies[SelectedEnemy].EnemyOnScreen.Destroy(); 275 Enemies.RemoveAt(SelectedEnemy); 276 EnemiesOnScreen.RemoveAt(SelectedEnemy); 277 PrevSelectedEnemy = 0; 278 279 if (Enemies.Count == 0) 287 ATK.Animation.Invoke(CurrentAlly); 288 289 } 290 else 291 { 292 293 DamageHitsplat(EnemiesOnScreen[SelectedEnemy].Position - JRPG.Game.Camera.Position, TrueDamage, Crit); 294 Enemies[SelectedEnemy].Stats.HP -= TrueDamage; 295 296 if (Enemies[SelectedEnemy].Stats.HP <= 0) 280 297 { 281 EndBattle(); 298 Enemies[SelectedEnemy].EnemyOnScreen.Destroy(); 299 Enemies.RemoveAt(SelectedEnemy); 300 EnemiesOnScreen.RemoveAt(SelectedEnemy); 301 PrevSelectedEnemy = 0; 302 303 if (Enemies.Count == 0) 304 { 305 EndBattle(); 306 } 282 307 } 283 308 } 284 285 309 _AllyQueue.Peek().WaitTimeMeter.Value = 0; 286 310 _AllyQueue.Dequeue().CanMakeAction = false; -
2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/Characters/CharacterBase.cs
r6304 r6341 50 50 51 51 public Image Idle { get; set; } 52 public Animation Animation { get; set; } 53 54 public GameObject AllyOnScreen { get; set; } 52 55 53 56 public class _BaseStats … … 576 579 { 577 580 Attacks.Clear(); 578 Attack.LearnAtLevel = 1; Attacks.Add(Attack);581 //Attack.LearnAtLevel = 1; Attacks.Add(Attack); 579 582 } 580 583 -
2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/Characters/CharacterList.cs
r6304 r6341 7 7 public class CharacterList 8 8 { 9 public static CharacterBase Sonic() 10 { 11 CharacterBase Sonic = new CharacterBase(); 12 13 Sonic.Name = "Sonic"; 14 Sonic.Idle = Images.Characters.Sonic_Idle; 15 Sonic.Animation = Images.Characters.Sonic_Kick; 16 17 Sonic.LearnedAttacks.Add(AttackList.Kick()); 18 19 return Sonic; 20 } 21 9 22 public static CharacterBase TestChar() 10 23 { -
2015/26/MikkoL/JRPG/JRPG/JRPG/Images.cs
r6305 r6341 15 15 { 16 16 public static Image Test = JRPG.LoadImage("BG//bg_test"); 17 } 18 19 public static class Characters 20 { 21 public static Image Sonic_Idle = JRPG.LoadImage("Characters//Sonic//Sonic"); 22 public static Animation Sonic_Kick = JRPG.LoadAnimation("Characters//Sonic//Sonic_Kick"); 17 23 } 18 24 -
2015/26/MikkoL/JRPG/JRPG/JRPG/JRPG.csproj
r6281 r6341 120 120 <Compile Include="Battle\EnemyBase\EnemyBase.cs" /> 121 121 <Compile Include="DialogBox.cs" /> 122 <Compile Include="Overworld\Exit.cs" /> 122 123 <Compile Include="Pointer.cs" /> 123 124 <Compile Include="ScrollingTextMenu.cs" /> -
2015/26/MikkoL/JRPG/JRPG/JRPG/JRPG.csproj.Debug.cachefile
r6319 r6341 28 28 Content\Water\Anim_Water02_0.xnb 29 29 Content\Water\Anim_Water03_0.xnb 30 Content\Enemies\Autismob\Purple.xnb 31 Content\Enemies\Autismob\Red.xnb 32 Content\Enemies\Autismob\Yellow.xnb 33 Content\Characters\Sonic\Sonic.xnb 34 Content\Characters\Sonic\Sonic_Kick.xnb 35 Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb 36 Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb 37 Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb 30 38 Content\AsRifle.xnb 31 39 Content\Auto.xnb -
2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/Entities/Player.cs
r6281 r6341 27 27 Player.PositionInTiles += Target.Normalize(); 28 28 UnderTile = (Tile)OverworldView.CurrentCollisionMap.CollisionMapArray.GetValue((int)PositionInTiles.X, (int)PositionInTiles.Y); 29 if (UnderTile.Type == TileType.Exit) 30 { 31 32 } 29 33 RandomEncounter.Step(UnderTile); 30 34 JRPG.Game.CheckWhereCanMove(); -
2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/MapData.cs
r6304 r6341 14 14 15 15 public string CurrentMapIndex; 16 17 public List<Exit> Exits = new List<Exit>(); 16 18 17 19 public List<EnemyGroup> EnemiesList() -
2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/Tiles/TileTypes.cs
r6281 r6341 14 14 Lava, 15 15 Event, 16 Exit,17 16 SpecialCollision, 18 Slow 17 Slow, 18 Exit 19 19 } -
2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/Tiles/Tiles.cs
r6281 r6341 8 8 { 9 9 public TileType Type { get; set; } 10 public int ExitNum { get; set; } 10 11 11 12 public bool IsWalkable { get; set; } 12 13 14 /* 13 15 public bool IsWalkableFromLeft { get; set; } 14 16 public bool IsWalkableFromRight { get; set; } 15 17 public bool IsWalkableFromTop { get; set; } 16 18 public bool IsWalkableFromBottom { get; set; } 19 */ 17 20 18 21 public Tile() … … 37 40 else IsWalkable = true; 38 41 } 42 43 public Tile(int _ExitNum) 44 : base() 45 { 46 Type = TileType.Exit; 47 48 ExitNum = _ExitNum; 49 IsWalkable = true; 50 } 39 51 } -
2015/26/MikkoL/JRPG/JRPG/JRPG/obj/x86/Debug/ContentPipeline-{D60BC67C-D86B-426A-A33D-CA5138E0FDF3}.xml
r6319 r6341 262 262 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Water\Anim_Water03_0.xnb</Output> 263 263 <Time>2015-06-19T17:26:42+03:00</Time> 264 </Item> 265 <Item> 266 <Source>Enemies\Autismob\Purple.png</Source> 267 <Name>Enemies\Autismob\Purple</Name> 268 <Importer>TextureImporter</Importer> 269 <Processor>TextureProcessor</Processor> 270 <Options>None</Options> 271 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Purple.xnb</Output> 272 <Time>2015-06-25T10:34:29.8820815+03:00</Time> 273 </Item> 274 <Item> 275 <Source>Enemies\Autismob\Red.png</Source> 276 <Name>Enemies\Autismob\Red</Name> 277 <Importer>TextureImporter</Importer> 278 <Processor>TextureProcessor</Processor> 279 <Options>None</Options> 280 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Red.xnb</Output> 281 <Time>2015-06-25T10:33:43.2514144+03:00</Time> 282 </Item> 283 <Item> 284 <Source>Enemies\Autismob\Yellow.png</Source> 285 <Name>Enemies\Autismob\Yellow</Name> 286 <Importer>TextureImporter</Importer> 287 <Processor>TextureProcessor</Processor> 288 <Options>None</Options> 289 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Yellow.xnb</Output> 290 <Time>2015-06-25T10:34:09.4369121+03:00</Time> 291 </Item> 292 <Item> 293 <Source>Characters\Sonic\Sonic.png</Source> 294 <Name>Characters\Sonic\Sonic</Name> 295 <Importer>TextureImporter</Importer> 296 <Processor>TextureProcessor</Processor> 297 <Options>None</Options> 298 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic.xnb</Output> 299 <Time>2015-06-25T11:11:15.8812575+03:00</Time> 300 </Item> 301 <Item> 302 <Source>Characters\Sonic\Sonic_Kick.anim</Source> 303 <Name>Characters\Sonic\Sonic_Kick</Name> 304 <Importer>AnimationImporter</Importer> 305 <Processor>AnimationContentProcessor</Processor> 306 <Options>None</Options> 307 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick.xnb</Output> 308 <Time>2015-06-25T11:43:18.8822468+03:00</Time> 309 <Request>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb</Request> 310 <Request>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb</Request> 311 <Request>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb</Request> 312 </Item> 313 <Item> 314 <Source>Characters\Sonic\Sonic_Kick\Sonic_Kick01.png</Source> 315 <Importer>TextureImporter</Importer> 316 <Processor>TextureProcessor</Processor> 317 <Options>None</Options> 318 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb</Output> 319 <Time>2015-06-25T11:11:32.3211978+03:00</Time> 320 </Item> 321 <Item> 322 <Source>Characters\Sonic\Sonic_Kick\Sonic_Kick02.png</Source> 323 <Importer>TextureImporter</Importer> 324 <Processor>TextureProcessor</Processor> 325 <Options>None</Options> 326 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb</Output> 327 <Time>2015-06-25T11:11:41.2137064+03:00</Time> 328 </Item> 329 <Item> 330 <Source>Characters\Sonic\Sonic_Kick\Sonic_Kick00.png</Source> 331 <Importer>TextureImporter</Importer> 332 <Processor>TextureProcessor</Processor> 333 <Options>None</Options> 334 <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb</Output> 335 <Time>2015-06-25T11:11:15.8812575+03:00</Time> 264 336 </Item> 265 337 <BuildSuccessful>true</BuildSuccessful> -
2015/26/MikkoL/JRPG/JRPG/JRPG/obj/x86/Debug/JRPG.csproj.FileListAbsolute.txt
r6319 r6341 270 270 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\obj\x86\Debug\JRPG.csprojResolveAssemblyReference.cache 271 271 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 272 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Purple.xnb 273 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Red.xnb 274 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Yellow.xnb 275 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic.xnb 276 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick.xnb 277 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb 278 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb 279 C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb -
2015/26/MikkoL/JRPG/JRPG/JRPG/obj/x86/Debug/cachefile-{D60BC67C-D86B-426A-A33D-CA5138E0FDF3}-targetpath.txt
r6319 r6341 28 28 Content\Water\Anim_Water02_0.xnb 29 29 Content\Water\Anim_Water03_0.xnb 30 Content\Enemies\Autismob\Purple.xnb 31 Content\Enemies\Autismob\Red.xnb 32 Content\Enemies\Autismob\Yellow.xnb 33 Content\Characters\Sonic\Sonic.xnb 34 Content\Characters\Sonic\Sonic_Kick.xnb 35 Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb 36 Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb 37 Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb -
2015/26/MikkoL/JRPG/JRPG/JRPGContent/JRPGContent.contentproj
r6305 r6341 261 261 </Compile> 262 262 </ItemGroup> 263 <ItemGroup> 264 <Compile Include="Enemies\Autismob\Purple.png"> 265 <Name>Purple</Name> 266 <Importer>TextureImporter</Importer> 267 <Processor>TextureProcessor</Processor> 268 </Compile> 269 <Compile Include="Enemies\Autismob\Red.png"> 270 <Name>Red</Name> 271 <Importer>TextureImporter</Importer> 272 <Processor>TextureProcessor</Processor> 273 </Compile> 274 <Compile Include="Enemies\Autismob\Yellow.png"> 275 <Name>Yellow</Name> 276 <Importer>TextureImporter</Importer> 277 <Processor>TextureProcessor</Processor> 278 </Compile> 279 </ItemGroup> 280 <ItemGroup /> 281 <ItemGroup> 282 <Compile Include="Characters\Sonic\Sonic.png"> 283 <Name>Sonic</Name> 284 <Importer>TextureImporter</Importer> 285 <Processor>TextureProcessor</Processor> 286 </Compile> 287 </ItemGroup> 288 <ItemGroup> 289 <Compile Include="Characters\Sonic\Sonic_Kick.anim"> 290 <Name>Sonic_Kick</Name> 291 <Importer>AnimationImporter</Importer> 292 <Processor>AnimationContentProcessor</Processor> 293 </Compile> 294 </ItemGroup> 263 295 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 264 296 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.