Changeset 8643 for 2017/24/MatiasK


Ignore:
Timestamp:
2017-06-14 11:57:36 (2 years ago)
Author:
npo17_7
Message:

Aseet thety

Location:
2017/24/MatiasK/SimpleGame/SimpleGame
Files:
5 added
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/MatiasK/SimpleGame/SimpleGame/SimpleGame/SimpleGame.cs

    r8614 r8643  
    1212    PhysicsObject pelaaja1; 
    1313    List<Label> valikonKohdat; 
    14     Image olionKuva = LoadImage("spaceship3"); 
     14    Image olionKuva = LoadImage("Spaceship"); 
    1515     
    1616 
     
    1919        pelaaja1 = new PlatformCharacter(200, 100);         
    2020        Add(pelaaja1); 
    21         pelaaja1.Image = olionKuva;         
     21        pelaaja1.Image = olionKuva; 
    2222        //Valikko(); 
     23        LaserGun pelaajan1Ase; 
    2324 
    2425 
     
    4546        Mouse.IsCursorVisible = true; 
    4647 
     48        pelaajan1Ase = new LaserGun(5, 5); 
     49 
     50        Mouse.Listen(MouseButton.Left, ButtonState.Down, AmmuAseella, "Ammu", pelaajan1Ase); 
     51 
     52         
     53 
     54        //Ammusten määrä aluksi: 
     55        pelaajan1Ase.Ammo.Value = 100000; 
     56 
     57        //Mitä tapahtuu kun ammus osuu johonkin? 
     58        pelaajan1Ase.ProjectileCollision = AmmusOsui; 
     59 
     60        pelaaja1.Add(pelaajan1Ase); 
     61 
    4762        // Mouse.ListenMovement(1.0, ValikossaLiikkuminen, null); 
    4863 
    4964 
    50         const double NOPEUS = 300; 
     65        const double NOPEUS = 500; 
    5166        Keyboard.Listen(Key.A, ButtonState.Down, 
    5267          LiikutaPelaajaa, null, new Vector(-NOPEUS, 0)); 
     
    5469          LiikutaPelaajaa, null, new Vector(NOPEUS, 0)); 
    5570        Keyboard.Listen(Key.W, ButtonState.Down, 
    56           LiikutaPelaajaa, null, new Vector(0, 200)); 
     71          LiikutaPelaajaa, null, new Vector(0, 100)); 
    5772        Keyboard.Listen(Key.S, ButtonState.Down, 
    58           LiikutaPelaajaa, null, new Vector(0, -200)); 
     73          LiikutaPelaajaa, null, new Vector(0, -100)); 
    5974        Keyboard.Listen(Key.A, ButtonState.Released, 
    6075          LiikutaPelaajaa, null, Vector.Zero); 
     
    104119    } 
    105120 
     121    void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 
     122    { 
     123        //ammus.Destroy(); 
     124    } 
     125 
     126    void AmmuAseella(LaserGun ase) 
     127    { 
     128        PhysicsObject ammus = ase.Shoot(); 
     129 
     130        if (ammus != null) 
     131        { 
     132            ammus.Size *= 3; 
     133            //ammus.Image = ... 
     134            //ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 
     135        } 
     136    } 
     137 
    106138    void BestScore() 
    107139    { 
  • 2017/24/MatiasK/SimpleGame/SimpleGame/SimpleGame/SimpleGame.csproj.Debug.cachefile

    r8614 r8643  
    11Content\spaceship3.xnb 
     2Content\images.xnb 
     3Content\Spaceship.xnb 
  • 2017/24/MatiasK/SimpleGame/SimpleGame/SimpleGame/obj/x86/Debug/ContentPipeline-{5A6F348F-48A2-4571-B9C8-D919CC46F508}.xml

    r8614 r8643  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\bin\x86\Debug\Content\spaceship3.xnb</Output> 
    11       <Time>2017-06-13T14:10:52.8230852+03:00</Time> 
     11      <Time>2017-06-14T10:57:59.8435391+03:00</Time> 
     12    </Item> 
     13    <Item> 
     14      <Source>images.jpg</Source> 
     15      <Name>images</Name> 
     16      <Importer>TextureImporter</Importer> 
     17      <Processor>TextureProcessor</Processor> 
     18      <Options>None</Options> 
     19      <Output>C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\bin\x86\Debug\Content\images.xnb</Output> 
     20      <Time>2017-06-14T11:54:28.9295605+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>Spaceship.png</Source> 
     24      <Name>Spaceship</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\bin\x86\Debug\Content\Spaceship.xnb</Output> 
     29      <Time>2017-06-14T11:55:26.3677896+03:00</Time> 
    1230    </Item> 
    1331    <BuildSuccessful>true</BuildSuccessful> 
     
    5876      <Assembly> 
    5977        <Key>C:\WINDOWS\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    60         <Value>2017-06-07T15:46:40.1506283+03:00</Value> 
     78        <Value>2017-06-08T13:51:37.8161206+03:00</Value> 
    6179      </Assembly> 
    6280    </Assemblies> 
  • 2017/24/MatiasK/SimpleGame/SimpleGame/SimpleGame/obj/x86/Debug/SimpleGame.csproj.FileListAbsolute.txt

    r8614 r8643  
    88C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\obj\x86\Debug\SimpleGame.pdb 
    99C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\bin\x86\Debug\Content\spaceship3.xnb 
     10C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\bin\x86\Debug\Content\images.xnb 
     11C:\MyTemp\MatiasK\SimpleGame\SimpleGame\SimpleGame\bin\x86\Debug\Content\Spaceship.xnb 
  • 2017/24/MatiasK/SimpleGame/SimpleGame/SimpleGame/obj/x86/Debug/cachefile-{5A6F348F-48A2-4571-B9C8-D919CC46F508}-targetpath.txt

    r8614 r8643  
    11Content\spaceship3.xnb 
     2Content\images.xnb 
     3Content\Spaceship.xnb 
  • 2017/24/MatiasK/SimpleGame/SimpleGame/SimpleGameContent/SimpleGameContent.contentproj

    r8614 r8643  
    5353  </ItemGroup> 
    5454  <ItemGroup> 
    55     <Compile Include="download.jfif"> 
    56       <Name>download</Name> 
     55    <Compile Include="images.jpg"> 
     56      <Name>images</Name> 
     57      <Importer>TextureImporter</Importer> 
     58      <Processor>TextureProcessor</Processor> 
    5759    </Compile> 
    5860  </ItemGroup> 
    5961  <ItemGroup> 
    60     <Compile Include="downloadSpace.jfif"> 
    61       <Name>downloadSpace</Name> 
     62    <Compile Include="Spaceship.png"> 
     63      <Name>Spaceship</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
    6266    </Compile> 
    6367  </ItemGroup> 
Note: See TracChangeset for help on using the changeset viewer.