Changeset 8613


Ignore:
Timestamp:
2017-06-13 15:03:01 (6 years ago)
Author:
npo17_17
Message:
 
Location:
2017/24/TomasM
Files:
10 added
10 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/TomasM/SpaceInvanders/SpaceInvanders/SpaceInvanders/SpaceInvanders.cs

    r8584 r8613  
    1717        LuoPelaaja(); 
    1818        LuoPahis(); 
    19        
     19        Asteroidit(); 
    2020        Level.Background.Image = LoadImage ("tahtitaivas"); 
    2121        Level.Background.Size = Screen.Size; 
    22         Level.CreateBorders(); 
     22     
    2323 
    2424        Keyboard.Listen(Key.Left, ButtonState.Down, LiikutaPelaajaa, null, new Vector(-1000, 0)); 
     
    2727        Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, -1000)); 
    2828 
    29  
    30  
    31  
     29        Level.Width = Screen.Width; 
     30        Level.Height = Screen.Height; 
     31        Level.CreateBorders(); 
    3232 
    3333        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     
    4646        pelaaja = new PhysicsObject(75.0, 75.0); 
    4747        pelaaja.Image = LoadImage("avaruusalus"); 
     48        AddCollisionHandler(pelaaja, "pahapoika", BOOM); 
    4849 
    4950         
     
    5859    } 
    5960     
    60  
    61        void LuoPahis(Vector paikka) 
     61    void BOOM(PhysicsObject pelaaja, PhysicsObject pahis) 
    6262    { 
    63         Pahis = new PhysicsObject(75.0, 75.0); 
    64  
    6563 
    6664 
    6765    } 
     66       void LuoPahis() 
     67    { 
     68        Pahis = new PhysicsObject(75.0, 75.0); 
     69        //Pahis.Tag "kelju"; 
     70        Add(Pahis); 
     71        Pahis.Image = LoadImage("ufokuva2");  
     72         
    6873 
    69    
     74 
     75    } 
     76     
     77    void Asteroidit() 
     78    { 
     79        PhysicsObject asteroidi = new PhysicsObject(100.0, 100.0); 
     80            asteroidi.Image = LoadImage("komeetta"); 
     81        asteroidi.X = 600.0; 
     82        asteroidi.Y = -300.0; 
     83        asteroidi.Tag = "pahapoika"; 
     84        Add(asteroidi); 
     85 
     86    } 
    7087     
    7188} 
  • 2017/24/TomasM/SpaceInvanders/SpaceInvanders/SpaceInvanders/SpaceInvanders.csproj.Debug.cachefile

    r8567 r8613  
    44Content\avaruusalusvasen.xnb 
    55Content\tahtitaivas.xnb 
     6Content\komeetta.xnb 
     7Content\ufokuva2.xnb 
  • 2017/24/TomasM/SpaceInvanders/SpaceInvanders/SpaceInvanders/obj/x86/Debug/ContentPipeline-{D89DCF55-38C9-4BD1-B73C-611D49CDD9D9}.xml

    r8567 r8613  
    4646      <Output>C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\tahtitaivas.xnb</Output> 
    4747      <Time>2017-06-13T11:47:38.7424669+03:00</Time> 
     48    </Item> 
     49    <Item> 
     50      <Source>komeetta.png</Source> 
     51      <Name>komeetta</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\komeetta.xnb</Output> 
     56      <Time>2017-06-13T14:40:50.0097043+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>ufokuva2.png</Source> 
     60      <Name>ufokuva2</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\ufokuva2.xnb</Output> 
     65      <Time>2017-06-13T14:41:59.3329305+03:00</Time> 
    4866    </Item> 
    4967    <BuildSuccessful>true</BuildSuccessful> 
  • 2017/24/TomasM/SpaceInvanders/SpaceInvanders/SpaceInvanders/obj/x86/Debug/SpaceInvanders.csproj.FileListAbsolute.txt

    r8567 r8613  
    1212C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\avaruusalusvasen.xnb 
    1313C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\tahtitaivas.xnb 
     14C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\ufokuva2.xnb 
     15C:\MyTemp\TomasM\SpaceInvanders\SpaceInvanders\SpaceInvanders\bin\x86\Debug\Content\komeetta.xnb 
  • 2017/24/TomasM/SpaceInvanders/SpaceInvanders/SpaceInvanders/obj/x86/Debug/cachefile-{D89DCF55-38C9-4BD1-B73C-611D49CDD9D9}-targetpath.txt

    r8567 r8613  
    44Content\avaruusalusvasen.xnb 
    55Content\tahtitaivas.xnb 
     6Content\komeetta.xnb 
     7Content\ufokuva2.xnb 
  • 2017/24/TomasM/SpaceInvanders/SpaceInvanders/SpaceInvandersContent/SpaceInvandersContent.contentproj

    r8567 r8613  
    7676    </Compile> 
    7777  </ItemGroup> 
     78  <ItemGroup> 
     79    <Compile Include="komeetta.png"> 
     80      <Name>komeetta</Name> 
     81      <Importer>TextureImporter</Importer> 
     82      <Processor>TextureProcessor</Processor> 
     83    </Compile> 
     84  </ItemGroup> 
     85  <ItemGroup> 
     86    <Compile Include="ufokuva2.png"> 
     87      <Name>ufokuva2</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90    </Compile> 
     91  </ItemGroup> 
    7892  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    7993  <!--  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.