Changeset 6341 for 2015


Ignore:
Timestamp:
2015-06-25 11:51:34 (8 years ago)
Author:
mijoliim
Message:
 
Location:
2015/26/MikkoL
Files:
28 added
21 edited

Legend:

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

    r6305 r6341  
    1919 
    2020        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; 
    2156    } 
    2257 
     
    65100 
    66101    public Action OnUse { get; set; } 
    67     public Action Animation { get; set; } 
     102    public Action<CharacterBase> Animation { get; set; } 
    68103} 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/BattleView.cs

    r6319 r6341  
    7070        JRPG.Game.Keyboard.Listen(Key.Enter, ButtonState.Pressed, EndBattle, null); 
    7171 
    72         Allies.Add(CharacterList.TestChar()); 
    73         Allies.Add(CharacterList.TestChar()); 
    74         Allies.Add(CharacterList.TestChar()); 
     72        Allies.Add(CharacterList.Sonic()); 
    7573 
    7674        for (int i = 0; i < Allies.Count; i++) 
     
    7977        } 
    8078 
     79        LoadAllies(); 
    8180        LoadEnemies(_Enemies); 
    8281        LoadHUD(); 
     
    8483        Flags.InBattle = true; 
    8584        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        } 
    86103    } 
    87104 
     
    261278                    AllyNames[_AllyQueue.Peek().Index].IsFlashing = false; 
    262279                    AllyNames[_AllyQueue.Peek().Index].TextColor = Microsoft.Xna.Framework.Color.White; 
    263                      
     280 
     281                    CharacterBase CurrentAlly = _AllyQueue.Dequeue(); 
     282 
    264283                    ActionQueue.Enqueue(delegate 
    265284                    { 
    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) 
    273286                        { 
    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) 
    280297                            { 
    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                                } 
    282307                            } 
    283308                        } 
    284  
    285309                        _AllyQueue.Peek().WaitTimeMeter.Value = 0; 
    286310                        _AllyQueue.Dequeue().CanMakeAction = false; 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/Characters/CharacterBase.cs

    r6304 r6341  
    5050 
    5151    public Image Idle { get; set; } 
     52    public Animation Animation { get; set; } 
     53 
     54    public GameObject AllyOnScreen { get; set; } 
    5255 
    5356    public class _BaseStats 
     
    576579        { 
    577580            Attacks.Clear(); 
    578             Attack.LearnAtLevel = 1; Attacks.Add(Attack); 
     581            //Attack.LearnAtLevel = 1; Attacks.Add(Attack); 
    579582        } 
    580583         
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/Characters/CharacterList.cs

    r6304 r6341  
    77public class CharacterList 
    88{ 
     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 
    922    public static CharacterBase TestChar() 
    1023    { 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Images.cs

    r6305 r6341  
    1515    { 
    1616        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"); 
    1723    } 
    1824 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/JRPG.csproj

    r6281 r6341  
    120120    <Compile Include="Battle\EnemyBase\EnemyBase.cs" /> 
    121121    <Compile Include="DialogBox.cs" /> 
     122    <Compile Include="Overworld\Exit.cs" /> 
    122123    <Compile Include="Pointer.cs" /> 
    123124    <Compile Include="ScrollingTextMenu.cs" /> 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/JRPG.csproj.Debug.cachefile

    r6319 r6341  
    2828Content\Water\Anim_Water02_0.xnb 
    2929Content\Water\Anim_Water03_0.xnb 
     30Content\Enemies\Autismob\Purple.xnb 
     31Content\Enemies\Autismob\Red.xnb 
     32Content\Enemies\Autismob\Yellow.xnb 
     33Content\Characters\Sonic\Sonic.xnb 
     34Content\Characters\Sonic\Sonic_Kick.xnb 
     35Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb 
     36Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb 
     37Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb 
    3038Content\AsRifle.xnb 
    3139Content\Auto.xnb 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/Entities/Player.cs

    r6281 r6341  
    2727                Player.PositionInTiles += Target.Normalize(); 
    2828                UnderTile = (Tile)OverworldView.CurrentCollisionMap.CollisionMapArray.GetValue((int)PositionInTiles.X, (int)PositionInTiles.Y); 
     29                if (UnderTile.Type == TileType.Exit) 
     30                { 
     31 
     32                } 
    2933                RandomEncounter.Step(UnderTile); 
    3034                JRPG.Game.CheckWhereCanMove(); 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/MapData.cs

    r6304 r6341  
    1414 
    1515    public string CurrentMapIndex; 
     16 
     17    public List<Exit> Exits = new List<Exit>(); 
    1618 
    1719    public List<EnemyGroup> EnemiesList() 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/Tiles/TileTypes.cs

    r6281 r6341  
    1414    Lava, 
    1515    Event, 
    16     Exit, 
    1716    SpecialCollision, 
    18     Slow 
     17    Slow, 
     18    Exit 
    1919} 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/Tiles/Tiles.cs

    r6281 r6341  
    88{ 
    99    public TileType Type { get; set; } 
     10    public int ExitNum { get; set; } 
    1011 
    1112    public bool IsWalkable { get; set; } 
    1213 
     14    /* 
    1315    public bool IsWalkableFromLeft { get; set; } 
    1416    public bool IsWalkableFromRight { get; set; } 
    1517    public bool IsWalkableFromTop { get; set; } 
    1618    public bool IsWalkableFromBottom { get; set; } 
     19    */ 
    1720 
    1821    public Tile() 
     
    3740        else IsWalkable = true; 
    3841    } 
     42 
     43    public Tile(int _ExitNum) 
     44        : base() 
     45    { 
     46        Type = TileType.Exit; 
     47 
     48        ExitNum = _ExitNum; 
     49        IsWalkable = true; 
     50    } 
    3951} 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/obj/x86/Debug/ContentPipeline-{D60BC67C-D86B-426A-A33D-CA5138E0FDF3}.xml

    r6319 r6341  
    262262      <Output>C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Water\Anim_Water03_0.xnb</Output> 
    263263      <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> 
    264336    </Item> 
    265337    <BuildSuccessful>true</BuildSuccessful> 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/obj/x86/Debug/JRPG.csproj.FileListAbsolute.txt

    r6319 r6341  
    270270C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\obj\x86\Debug\JRPG.csprojResolveAssemblyReference.cache 
    271271C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     272C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Purple.xnb 
     273C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Red.xnb 
     274C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Enemies\Autismob\Yellow.xnb 
     275C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic.xnb 
     276C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick.xnb 
     277C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb 
     278C:\Users\user\Desktop\MikkoL\MikkoL\JRPG\JRPG\JRPG\bin\x86\Debug\Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb 
     279C:\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  
    2828Content\Water\Anim_Water02_0.xnb 
    2929Content\Water\Anim_Water03_0.xnb 
     30Content\Enemies\Autismob\Purple.xnb 
     31Content\Enemies\Autismob\Red.xnb 
     32Content\Enemies\Autismob\Yellow.xnb 
     33Content\Characters\Sonic\Sonic.xnb 
     34Content\Characters\Sonic\Sonic_Kick.xnb 
     35Content\Characters\Sonic\Sonic_Kick\Sonic_Kick01_0.xnb 
     36Content\Characters\Sonic\Sonic_Kick\Sonic_Kick02_0.xnb 
     37Content\Characters\Sonic\Sonic_Kick\Sonic_Kick00_0.xnb 
  • 2015/26/MikkoL/JRPG/JRPG/JRPGContent/JRPGContent.contentproj

    r6305 r6341  
    261261    </Compile> 
    262262  </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> 
    263295  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    264296  <!--  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.