Changeset 6941 for 2015


Ignore:
Timestamp:
2015-07-22 14:59:53 (4 years ago)
Author:
picakrty
Message:

Hahmojen animaatiot Done. Rajat luotu

Location:
2015/30/CamillaT
Files:
39 added
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • 2015/30/CamillaT/YouCombat/YouCombat/YouCombat/YouCombat.cs

    r6874 r6941  
    1010{ 
    1111 
    12     PhysicsObject rauski; 
    13     PhysicsObject miisas; 
    14     PhysicsObject soikku; 
     12    PlatformCharacter rauski; 
     13    PlatformCharacter miisas; 
     14    //PlatformCharacter soikku; 
    1515 
    1616    Image tubecon = LoadImage("TubeCombat - tausta"); 
    1717    Image rauskinKuva = LoadImage("TubeCombat - Rauski"); 
    1818    Image miisasinKuva = LoadImage("TubeCombat - Miisas"); 
    19     //Image soikunKuva = LoadImage ("TubeCombat - Soikku") 
     19    Image soikunKuva = LoadImage("TubeCombat - Soikku"); 
    2020 
    21     PhysicsObject pelaaja1; 
    22     PhysicsObject pelaaja2; 
    23      
     21    PlatformCharacter pelaaja1; 
     22    PlatformCharacter pelaaja2; 
     23 
     24    double nopeus = 400.0; 
     25    double hyppynopeus = 800.0; 
     26 
    2427 
    2528    public override void Begin() 
    2629    { 
    27         // Maisema valmis. Hahmoille lisää animaatioita ja uusitústa??? Hahmo valikko eikä kaikkia saman aikaa ruudulle!! 
    28  
     30        // TODO Maisema valmis. Hahmoille hyppy ja hyökkäys animaatiot??? Nosta alarajaa! Menuvalikko ja musiikki! 
     31        LuoKentta(); 
    2932        Hahmot(); 
    3033        PeliMusiikit(); 
     34        HahmojenAnimaatiot(); 
    3135        pelaaja1 = rauski; 
    3236        pelaaja2 = miisas; 
    3337        HahmojenOhjaus(); 
    3438 
    35         PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    36         Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     39    } 
    3740 
     41    void LuoKentta() 
     42    { 
    3843        Level.Width = Screen.Width; 
    3944        Level.Height = Screen.Height; 
     
    4247        tausta.Image = tubecon; 
    4348        Add(tausta, -3); 
    44          
    4549 
     50        Surface alaReuna = Surface.CreateBottom(Level); 
     51        Add(alaReuna); 
     52 
     53        Level.CreateBorders(); 
     54 
     55        Gravity = new Vector(0.0, -700.0); 
    4656    } 
    4757 
    4858    void Hahmot() 
    4959    { 
    50         rauski = new PhysicsObject(270, 450); 
    51         miisas = new PhysicsObject(270, 450); 
    52         soikku = new PhysicsObject(270, 450); 
     60        rauski = new PlatformCharacter(270, 450); 
     61        miisas = new PlatformCharacter(270, 450); 
     62        //soikku = new PlatformCharacter(270, 450); 
    5363 
    5464        rauski.X = 560.00; 
    5565        rauski.Y = -200.0; 
    5666 
    57         miisas.X = -650.00;    
     67        miisas.X = -650.00; 
    5868        miisas.Y = -200.0; 
    5969 
    60         //soikku.X =  
     70        //soikku.X = -500.00; 
    6171        //soikku.Y = -200.0; 
    6272 
     
    7282 
    7383 
    74     void HahmojenOhjaus() 
     84    void HahmojenAnimaatiot() 
    7585    { 
    76         Keyboard.Listen(Key. A, ButtonState.Pressed, Liikuta, "Liiku Vasemmalle",pelaaja1, new Vector(-10000.0, 0.0)); 
    77         Keyboard.Listen(Key. W, ButtonState.Pressed, Liikuta,   "Hyppy Ylos",pelaaja1, new Vector(0.0, 10000.0)); 
    78         //Keyboard.Listen(Key. S, ButtonState.Pressed, Liikuta,  "Liiku Alas",pelaaja1); 
    79         Keyboard.Listen(Key. D, ButtonState.Pressed, Liikuta, "Liiku Oikealle",pelaaja1, new Vector(10000.0,0.0)); 
    8086 
    81         //Koita saada toimii. Luo menuValikko -_-" 
    82  
    83         Gravity = new Vector(0.0, -100.0); 
     87       Animation rauskinKavely = LoadAnimation("Rauski"); 
     88       rauski.AnimWalk = rauskinKavely; 
     89       rauski.AnimIdle = new Animation(rauskinKuva); 
     90        //Rauskin hyppy! 
     91        
     92        Animation miisaksenKavely = LoadAnimation("Miisas"); 
     93        miisas.AnimWalk = miisaksenKavely; 
     94        miisas.AnimWalk.FPS = 5; 
     95        miisas.AnimIdle = new Animation(miisasinKuva); 
     96        //Animaatiot Miisaskelle! 
     97          
    8498 
    8599    } 
    86100 
    87     void Liikuta(PhysicsObject pelaaja,Vector vektor) 
     101 
     102 
     103    void HahmojenOhjaus() 
    88104    { 
    89         pelaaja.Push(vektor); 
     105        Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liiku Vasemmalle", pelaaja1, -nopeus); 
     106        Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Hyppy Ylos", pelaaja1, hyppynopeus); 
     107        Keyboard.Listen(Key.D, ButtonState.Down, Liikuta, "Liiku Oikealle", pelaaja1, nopeus); 
     108 
     109        Keyboard.Listen(Key.Left, ButtonState.Down, Liikuta, "Liiku Vasemmalle", pelaaja2, -nopeus); 
     110        Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Hyppy Ylos", pelaaja2, hyppynopeus); 
     111        Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liiku Oikealle", pelaaja2, nopeus); 
     112 
     113        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     114 
     115        //Koita saada toimii. Luo menuValikko -_-" 
     116        
     117 
     118    } 
     119 
     120    void Hyppaa(PlatformCharacter pelaaja, double suunta) 
     121    { 
     122        pelaaja.Jump(suunta); 
     123    } 
     124 
     125    void Liikuta(PlatformCharacter pelaaja, double suunta) 
     126    { 
     127        pelaaja.Walk(suunta); 
    90128    } 
    91129 
     
    94132    { 
    95133 
    96         miisas.Destroy();  
    97  
    98  
     134        miisas.Destroy(); 
    99135 
    100136        //Tännekki Elämää 
     
    118154            elamaLaskuri.LowerLimit += delegate { this.Destroy(); }; 
    119155        } 
     156 
     157        void Menu() 
     158        {  
     159         
     160        } 
     161 
     162  
     163 
     164        void Rajahtukset() 
     165        { 
     166            //  AddCollisionHandler(pelaaja1, Pelaaja1Tormasi); 
     167 
     168 
     169        } 
    120170    } 
    121  
    122      
    123      
    124      
    125     } 
     171} 
    126172      
  • 2015/30/CamillaT/YouCombat/YouCombat/YouCombat/YouCombat.csproj.Debug.cachefile

    r6831 r6941  
    22Content\TubeCombat - Rauski.xnb 
    33Content\TubeCombat - Miisas.xnb 
     4Content\TubeCombat - Soikku.xnb 
     5Content\Rauski.xnb 
     6Content\Rauski\Rauski1.xnb 
     7Content\Rauski\Rauski2.xnb 
     8Content\Rauski\Rauski3.xnb 
     9Content\Miisas\Miisas1.xnb 
     10Content\Miisas\Miisas2.xnb 
     11Content\Miisas\Miisas3.xnb 
     12Content\Miisas.xnb 
  • 2015/30/CamillaT/YouCombat/YouCombat/YouCombat/obj/x86/Debug/YouCombat.csproj.FileListAbsolute.txt

    r6831 r6941  
    1010C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\TubeCombat - Rauski.xnb 
    1111C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\TubeCombat - Miisas.xnb 
     12C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\TubeCombat - Soikku.xnb 
     13C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski.xnb 
     14C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski1.xnb 
     15C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski2.xnb 
     16C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski3.xnb 
     17C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas1.xnb 
     18C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas2.xnb 
     19C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas3.xnb 
     20C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas.xnb 
  • 2015/30/CamillaT/YouCombat/YouCombat/YouCombat/obj/x86/Debug/cachefile-{66C8E644-CC23-4609-AD73-46EEDD2FF150}-targetpath.txt

    r6831 r6941  
    22Content\TubeCombat - Rauski.xnb 
    33Content\TubeCombat - Miisas.xnb 
     4Content\TubeCombat - Soikku.xnb 
     5Content\Rauski.xnb 
     6Content\Rauski\Rauski1.xnb 
     7Content\Rauski\Rauski2.xnb 
     8Content\Rauski\Rauski3.xnb 
     9Content\Miisas\Miisas1.xnb 
     10Content\Miisas\Miisas2.xnb 
     11Content\Miisas\Miisas3.xnb 
     12Content\Miisas.xnb 
  • 2015/30/CamillaT/YouCombat/YouCombat/YouCombatContent/YouCombatContent.contentproj

    r6831 r6941  
    6666    </Compile> 
    6767  </ItemGroup> 
     68  <ItemGroup> 
     69    <Compile Include="TubeCombat - Soikku.png"> 
     70      <Name>TubeCombat - Soikku</Name> 
     71      <Importer>TextureImporter</Importer> 
     72      <Processor>TextureProcessor</Processor> 
     73    </Compile> 
     74  </ItemGroup> 
     75  <ItemGroup> 
     76    <Compile Include="Rauski.anim"> 
     77      <Name>Rauski</Name> 
     78      <Importer>AnimationImporter</Importer> 
     79      <Processor>AnimationContentProcessor</Processor> 
     80    </Compile> 
     81  </ItemGroup> 
     82  <ItemGroup> 
     83    <Compile Include="Rauski\Rauski1.png"> 
     84      <Name>Rauski1</Name> 
     85      <Importer>TextureImporter</Importer> 
     86      <Processor>TextureProcessor</Processor> 
     87    </Compile> 
     88    <Compile Include="Rauski\Rauski2.png"> 
     89      <Name>Rauski2</Name> 
     90      <Importer>TextureImporter</Importer> 
     91      <Processor>TextureProcessor</Processor> 
     92    </Compile> 
     93    <Compile Include="Rauski\Rauski3.png"> 
     94      <Name>Rauski3</Name> 
     95      <Importer>TextureImporter</Importer> 
     96      <Processor>TextureProcessor</Processor> 
     97    </Compile> 
     98  </ItemGroup> 
     99  <ItemGroup> 
     100    <Compile Include="Miisas.anim"> 
     101      <Name>Miisas</Name> 
     102      <Importer>AnimationImporter</Importer> 
     103      <Processor>AnimationContentProcessor</Processor> 
     104    </Compile> 
     105  </ItemGroup> 
     106  <ItemGroup> 
     107    <Compile Include="Miisas\Miisas1.png"> 
     108      <Name>Miisas1</Name> 
     109      <Importer>TextureImporter</Importer> 
     110      <Processor>TextureProcessor</Processor> 
     111    </Compile> 
     112    <Compile Include="Miisas\Miisas2.png"> 
     113      <Name>Miisas2</Name> 
     114      <Importer>TextureImporter</Importer> 
     115      <Processor>TextureProcessor</Processor> 
     116    </Compile> 
     117    <Compile Include="Miisas\Miisas3.png"> 
     118      <Name>Miisas3</Name> 
     119      <Importer>TextureImporter</Importer> 
     120      <Processor>TextureProcessor</Processor> 
     121    </Compile> 
     122  </ItemGroup> 
    68123  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    69124  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/30/CamillaT/YouCombat/YouCombat/YouCombatContent/obj/x86/Debug/ContentPipeline.xml

    r6874 r6941  
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\TubeCombat - Rauski.xnb</Output> 
    20       <Time>2015-07-21T13:49:19.2190549+03:00</Time> 
     20      <Time>2015-07-22T13:21:31.9746902+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2828      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\TubeCombat - Miisas.xnb</Output> 
    2929      <Time>2015-07-21T13:51:38.2210439+03:00</Time> 
     30    </Item> 
     31    <Item> 
     32      <Source>TubeCombat - Soikku.png</Source> 
     33      <Name>TubeCombat - Soikku</Name> 
     34      <Importer>TextureImporter</Importer> 
     35      <Processor>TextureProcessor</Processor> 
     36      <Options>None</Options> 
     37      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\TubeCombat - Soikku.xnb</Output> 
     38      <Time>2015-07-22T10:05:30.3595205+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>Rauski.anim</Source> 
     42      <Name>Rauski</Name> 
     43      <Importer>AnimationImporter</Importer> 
     44      <Processor>AnimationContentProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski.xnb</Output> 
     47      <Time>2015-07-22T13:29:51.9862902+03:00</Time> 
     48      <Request>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski1.xnb</Request> 
     49      <Request>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski2.xnb</Request> 
     50      <Request>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski3.xnb</Request> 
     51    </Item> 
     52    <Item> 
     53      <Source>Rauski\Rauski1.png</Source> 
     54      <Name>Rauski\Rauski1</Name> 
     55      <Importer>TextureImporter</Importer> 
     56      <Processor>TextureProcessor</Processor> 
     57      <Options>None</Options> 
     58      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski1.xnb</Output> 
     59      <Time>2015-07-22T13:30:37.9202902+03:00</Time> 
     60    </Item> 
     61    <Item> 
     62      <Source>Rauski\Rauski2.png</Source> 
     63      <Name>Rauski\Rauski2</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
     66      <Options>None</Options> 
     67      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski2.xnb</Output> 
     68      <Time>2015-07-22T13:30:42.8398902+03:00</Time> 
     69    </Item> 
     70    <Item> 
     71      <Source>Rauski\Rauski3.png</Source> 
     72      <Name>Rauski\Rauski3</Name> 
     73      <Importer>TextureImporter</Importer> 
     74      <Processor>TextureProcessor</Processor> 
     75      <Options>None</Options> 
     76      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Rauski\Rauski3.xnb</Output> 
     77      <Time>2015-07-22T13:30:46.4872902+03:00</Time> 
     78    </Item> 
     79    <Item> 
     80      <Source>Miisas\Miisas1.png</Source> 
     81      <Name>Miisas\Miisas1</Name> 
     82      <Importer>TextureImporter</Importer> 
     83      <Processor>TextureProcessor</Processor> 
     84      <Options>None</Options> 
     85      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas1.xnb</Output> 
     86      <Time>2015-07-22T14:45:58.8573931+03:00</Time> 
     87    </Item> 
     88    <Item> 
     89      <Source>Miisas\Miisas2.png</Source> 
     90      <Name>Miisas\Miisas2</Name> 
     91      <Importer>TextureImporter</Importer> 
     92      <Processor>TextureProcessor</Processor> 
     93      <Options>None</Options> 
     94      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas2.xnb</Output> 
     95      <Time>2015-07-22T14:45:58.8573931+03:00</Time> 
     96    </Item> 
     97    <Item> 
     98      <Source>Miisas\Miisas3.png</Source> 
     99      <Name>Miisas\Miisas3</Name> 
     100      <Importer>TextureImporter</Importer> 
     101      <Processor>TextureProcessor</Processor> 
     102      <Options>None</Options> 
     103      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas3.xnb</Output> 
     104      <Time>2015-07-22T14:45:58.8573931+03:00</Time> 
     105    </Item> 
     106    <Item> 
     107      <Source>Miisas.anim</Source> 
     108      <Name>Miisas</Name> 
     109      <Importer>AnimationImporter</Importer> 
     110      <Processor>AnimationContentProcessor</Processor> 
     111      <Options>None</Options> 
     112      <Output>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas.xnb</Output> 
     113      <Time>2015-07-22T14:52:01.7168828+03:00</Time> 
     114      <Request>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas1.xnb</Request> 
     115      <Request>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas2.xnb</Request> 
     116      <Request>C:\MyTemp\CamillaT\YouCombat\YouCombat\YouCombat\bin\x86\Debug\Content\Miisas\Miisas3.xnb</Request> 
    30117    </Item> 
    31118    <BuildSuccessful>true</BuildSuccessful> 
Note: See TracChangeset for help on using the changeset viewer.