Changeset 5589 for 2014/30


Ignore:
Timestamp:
2014-07-23 14:55:51 (9 years ago)
Author:
mikmaral
Message:

Vähä lisäsin esineitä ja lisäsin pelaajan

Location:
2014/30/MikaH
Files:
39 added
10 edited

Legend:

Unmodified
Added
Removed
  • 2014/30/MikaH/Erämaan Valloittaja/Erämaan Valloittaja/Erämaan Valloittaja/Erämaan Valloittaja.csproj

    r5573 r5589  
    120120  </ItemGroup> 
    121121  <ItemGroup> 
    122     <ProjectReference Include="..\Erämaan_ValloittajaContent\Erämaan_ValloittajaContent.contentproj"> 
    123       <Name>Erämaan_ValloittajaContent</Name> 
    124       <XnaReferenceType>Content</XnaReferenceType> 
    125     </ProjectReference> 
    126   </ItemGroup> 
    127   <ItemGroup> 
    128122    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client"> 
    129123      <Visible>False</Visible> 
     
    152146    </BootstrapperPackage> 
    153147  </ItemGroup> 
     148  <ItemGroup> 
     149    <ProjectReference Include="..\Erämaan ValloittajaContent\Erämaan ValloittajaContent.contentproj"> 
     150      <Project>{64E1F012-12AE-4056-863F-E8D2022A622F}</Project> 
     151      <Name>Erämaan ValloittajaContent %28Content%29</Name> 
     152      <XnaReferenceType>Content</XnaReferenceType> 
     153    </ProjectReference> 
     154  </ItemGroup> 
    154155  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 
    155156  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" /> 
  • 2014/30/MikaH/Erämaan Valloittaja/Erämaan Valloittaja/Erämaan Valloittaja/Erämaan_Valloittaja.cs

    r5573 r5589  
    99public class Erämaan_Valloittaja : PhysicsGame 
    1010{ 
     11    Shape kiven1muoto; 
     12    Image kivikuva1 = LoadImage("kivi1"); 
     13    Shape puunmuoto; 
     14    Image puukuva = LoadImage("puu"); 
     15    Image taustakuva = LoadImage("maisema"); 
     16    Shape pelaajanmuoto; 
     17    Image pelaajakuva = LoadImage("PlayerStandingWatchingRigh"); 
     18    PhysicsObject Pelaaja = new PhysicsObject(180, 300); 
     19    Vector nopeusOikealle = new Vector(200, 0); 
     20    Vector nopeusVasemmalle = new Vector(-200, 0); 
     21    Shape kepinmuoto; 
     22    Image kepinkuva = LoadImage("keppi"); 
     23 
    1124    public override void Begin() 
    1225    { 
     26 
     27 
     28        kepinmuoto = Shape.FromImage(kepinkuva); 
     29        kiven1muoto = Shape.FromImage(kivikuva1); 
     30        puunmuoto = Shape.FromImage(puukuva); 
     31        pelaajanmuoto = Shape.FromImage(pelaajakuva); 
    1332        LuoKentta(); 
     33        AsetaOhjaimet(); 
    1434        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    15         LuoKivi(20, 20); 
     35        LuoKeppi(); 
     36         
    1637    } 
    1738 
    1839    void LuoKentta() 
    1940        { 
    20             SetWindowSize(800, 600, false); 
     41            SetWindowSize(1200, 1000, false); 
     42            Gravity = new Vector(0, -800); 
     43            Level.Background.Image = taustakuva; 
     44 
     45            Surface alareuna = Surface.CreateBottom(Level, 981, 980, 5, 20); 
     46            Add(alareuna); 
     47             
     48            //LuoKivi1(40, 40, 30, 30); 
     49            LuoPuu(300, 1000, 200, 20); 
     50            LuoPelaaja(); 
     51             
     52        } 
     53 
     54    void LuoKivi1(double kivi1leveys,double kivi1pituus, double x, double y) 
     55    { 
     56        PhysicsObject kivi1 = new PhysicsObject(kivi1leveys, kivi1pituus); 
     57 
     58         
     59         
     60         
     61        kivi1.X = x; 
     62        kivi1.Y = y; 
     63 
     64         
     65        kivi1.Image = kivikuva1; 
     66        Add(kivi1); 
     67    } 
     68 
     69    void LuoPuu(double puuleveys, double puupituus, double puux, double puuy) 
     70    { 
     71        PhysicsObject Puu = PhysicsObject.CreateStaticObject(puuleveys, puupituus); 
     72        Puu.IgnoresCollisionResponse = true; 
     73         
     74        Puu.X = puux; 
     75        Puu.Y = puuy; 
     76 
     77        Puu.Image = puukuva; 
     78        Add(Puu); 
     79    } 
     80 
     81    void LuoPelaaja() 
     82    { 
     83         
     84        Pelaaja.Image = pelaajakuva; 
     85        Add(Pelaaja); 
     86        Camera.Follow(Pelaaja); 
     87    } 
     88 
     89    void AsetaOhjaimet() 
     90    { 
     91         
     92        Keyboard.Listen(Key.D, ButtonState.Down, AsetaNopeus, "Mene Oikealle", Pelaaja, nopeusOikealle); 
     93        Keyboard.Listen(Key.D, ButtonState.Released, AsetaNopeus, null, Pelaaja, Vector.Zero); 
     94        Keyboard.Listen(Key.A, ButtonState.Down, AsetaNopeus, "Mene Vasemmalle", Pelaaja, nopeusVasemmalle); 
     95        Keyboard.Listen(Key.A, ButtonState.Released, AsetaNopeus, null, Pelaaja, Vector.Zero); 
     96 
     97    } 
     98 
     99 
     100    void AsetaNopeus(PhysicsObject maila, Vector nopeus) 
     101    { 
     102        maila.Velocity = nopeus; 
     103    } 
     104 
     105    void LuoKeppi() 
     106    { 
     107        PhysicsObject keppi = new PhysicsObject(10, 100); 
     108 
     109        keppi.Image = kepinkuva; 
     110 
     111        keppi.X = 1000; 
     112        keppi.Y = 0; 
     113 
     114 
     115        Add(keppi); 
     116    } 
    21117 
    22118 
    23119 
    24120 
    25         } 
    26121 
    27     void LuoKivi(double x,double y) 
    28     { 
    29         PhysicsObject kivi = new PhysicsObject(x, y); 
    30         kivi.Shape = Shape.Octagon; 
    31         Add(kivi); 
    32     } 
    33          
    34      
     122 
     123 
     124 
    35125 
    36126} 
  • 2014/30/MikaH/Erämaan Valloittaja/Erämaan Valloittaja/Erämaan Valloittaja/obj/x86/Debug/Erämaan Valloittaja.csproj.FileListAbsolute.txt

    r5573 r5589  
    77C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\obj\x86\Debug\ErÀmaan Valloittaja.exe 
    88C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\obj\x86\Debug\ErÀmaan Valloittaja.pdb 
     9C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\kivi1.xnb 
     10C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\keppi.xnb 
     11C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\kivi2.xnb 
     12C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\kivi3.xnb 
     13C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\kivityökalu.xnb 
     14C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\Lehti.xnb 
     15C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\Maisema.xnb 
     16C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\nuotio palanu.xnb 
     17C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\nuotio sytytetty.xnb 
     18C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\nuotio sytyttÀmÀtön.xnb 
     19C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\palanu.xnb 
     20C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\PlayerStandingWatchingLeft.xnb 
     21C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\PlayerStandingWatchingRigh.xnb 
     22C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\Puu.xnb 
     23C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\tukki.xnb 
     24C:\MyTemp\MikaH\ErÀmaan Valloittaja\ErÀmaan Valloittaja\ErÀmaan Valloittaja\bin\x86\Debug\Content\tuli1.xnb 
  • 2014/30/MikaH/Erämaan Valloittaja/Erämaan Valloittaja/Erämaan ValloittajaContent/Erämaan ValloittajaContent.contentproj

    r5573 r5589  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="kivi1.png"> 
     49      <Name>kivi1</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="keppi.png"> 
     56      <Name>keppi</Name> 
     57      <Importer>TextureImporter</Importer> 
     58      <Processor>TextureProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
     61  <ItemGroup> 
     62    <Compile Include="kivi2.png"> 
     63      <Name>kivi2</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
     66    </Compile> 
     67  </ItemGroup> 
     68  <ItemGroup> 
     69    <Compile Include="kivi3.png"> 
     70      <Name>kivi3</Name> 
     71      <Importer>TextureImporter</Importer> 
     72      <Processor>TextureProcessor</Processor> 
     73    </Compile> 
     74  </ItemGroup> 
     75  <ItemGroup> 
     76    <Compile Include="kivityökalu.png"> 
     77      <Name>kivityökalu</Name> 
     78      <Importer>TextureImporter</Importer> 
     79      <Processor>TextureProcessor</Processor> 
     80    </Compile> 
     81  </ItemGroup> 
     82  <ItemGroup> 
     83    <Compile Include="Lehti.png"> 
     84      <Name>Lehti</Name> 
     85      <Importer>TextureImporter</Importer> 
     86      <Processor>TextureProcessor</Processor> 
     87    </Compile> 
     88  </ItemGroup> 
     89  <ItemGroup> 
     90    <Compile Include="nuotio palanu.png"> 
     91      <Name>nuotio palanu</Name> 
     92      <Importer>TextureImporter</Importer> 
     93      <Processor>TextureProcessor</Processor> 
     94    </Compile> 
     95  </ItemGroup> 
     96  <ItemGroup> 
     97    <Compile Include="nuotio sytytetty.png"> 
     98      <Name>nuotio sytytetty</Name> 
     99      <Importer>TextureImporter</Importer> 
     100      <Processor>TextureProcessor</Processor> 
     101    </Compile> 
     102  </ItemGroup> 
     103  <ItemGroup> 
     104    <Compile Include="nuotio sytyttämätön.png"> 
     105      <Name>nuotio sytyttämätön</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108    </Compile> 
     109  </ItemGroup> 
     110  <ItemGroup> 
     111    <Compile Include="palanu.png"> 
     112      <Name>palanu</Name> 
     113      <Importer>TextureImporter</Importer> 
     114      <Processor>TextureProcessor</Processor> 
     115    </Compile> 
     116  </ItemGroup> 
     117  <ItemGroup> 
     118    <Compile Include="PlayerStandingWatchingLeft.png"> 
     119      <Name>PlayerStandingWatchingLeft</Name> 
     120      <Importer>TextureImporter</Importer> 
     121      <Processor>TextureProcessor</Processor> 
     122    </Compile> 
     123  </ItemGroup> 
     124  <ItemGroup> 
     125    <Compile Include="PlayerStandingWatchingRigh.png"> 
     126      <Name>PlayerStandingWatchingRigh</Name> 
     127      <Importer>TextureImporter</Importer> 
     128      <Processor>TextureProcessor</Processor> 
     129    </Compile> 
     130  </ItemGroup> 
     131  <ItemGroup> 
     132    <Compile Include="Puu.png"> 
     133      <Name>Puu</Name> 
     134      <Importer>TextureImporter</Importer> 
     135      <Processor>TextureProcessor</Processor> 
     136    </Compile> 
     137  </ItemGroup> 
     138  <ItemGroup> 
     139    <Compile Include="tukki.png"> 
     140      <Name>tukki</Name> 
     141      <Importer>TextureImporter</Importer> 
     142      <Processor>TextureProcessor</Processor> 
     143    </Compile> 
     144  </ItemGroup> 
     145  <ItemGroup> 
     146    <Compile Include="tuli1.png"> 
     147      <Name>tuli1</Name> 
     148      <Importer>TextureImporter</Importer> 
     149      <Processor>TextureProcessor</Processor> 
     150    </Compile> 
     151  </ItemGroup> 
     152  <ItemGroup> 
     153    <Compile Include="Maisema.png"> 
     154      <Name>Maisema</Name> 
     155      <Importer>TextureImporter</Importer> 
     156      <Processor>TextureProcessor</Processor> 
     157    </Compile> 
     158  </ItemGroup> 
    47159  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    48160  <!--  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.