Changeset 6668 for 2015/27/JesseS


Ignore:
Timestamp:
2015-07-01 13:40:02 (8 years ago)
Author:
jesirkia
Message:
 
Location:
2015/27/JesseS/VoltsTank
Files:
5 added
9 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/JesseS/VoltsTank/VoltsTank/VoltsTank/VoltsTank.cs

    r6656 r6668  
    99public class VoltsTank : PhysicsGame 
    1010{ 
     11    AssaultRifle pelaajan1Ase; 
    1112    PhysicsObject pelaaja1; 
    1213    PhysicsObject pelaaja2; 
     14 
     15    Image ammuksenKuva = LoadImage("Ammus"); 
    1316 
    1417    double maxNopeus = 1500.0; 
     
    1619    public override void Begin() 
    1720    { 
     21        IsFullScreen = true; 
     22 
    1823        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Quit game"); 
    1924        ControllerOne.Listen(Button.Back, ButtonState.Pressed, ConfirmExit, "Quit game"); 
    2025 
     26        Grenade kranaatti = new Grenade(4.0); 
     27 
    2128        LuoPelaaja1(); 
    2229        LuoPelaaja2(); 
    23              
     30 
     31        pelaajan1Ase = new AssaultRifle(30, 10); 
     32 
     33        pelaajan1Ase.Ammo.Value = 1000; 
     34 
     35        pelaajan1Ase.ProjectileCollision = AmmusOsui; 
     36 
     37        pelaaja1.Add(pelaajan1Ase); 
    2438        
    25  
    26  
    2739        ControllerOne.ListenAnalog(AnalogControl.LeftStick, 0.1, 
    2840  LiikutaPelaajaa, "Liikuta pelaajaa tattia pyörittämällä.", pelaaja1); 
     
    3749        AmmuTykilla, "Käytä oikeaa liipasinta ampumisen tavoin.", pelaaja2); 
    3850 
     51        ControllerOne.Listen(Button.RightTrigger, ButtonState.Down, AmmuAseella, "Ammu", pelaajan1Ase); 
     52        ControllerOne.Listen(Button.LeftTrigger, ButtonState.Down, AmmuAseella, "Ammu", pelaajan1Ase); 
    3953 
     54        //ControllerTwo.Listen(Button.RightTrigger, ButtonState.Down, AmmuAseella, "Ammu", pelaajan2Ase); 
     55        //ControllerTwo.Listen(Button.LeftTrigger, ButtonState.Down, AmmuAseella, "Ammu", pelaajan2Ase); 
    4056    } 
    4157    void LiikutaPelaajaa(AnalogState tatinTila, PhysicsObject pelaaja) 
     
    6682    } 
    6783 
     84    void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 
     85    { 
     86        ammus.Destroy(); 
     87    } 
     88    void AmmuAseella(AssaultRifle ase) 
     89    { 
     90        PhysicsObject ammus = ase.Shoot(); 
    6891 
     92        if (ammus != null) 
     93        { 
     94            ammus.Size *= 1; 
     95            ammus.Image = ammuksenKuva; 
     96            ammus.MaximumLifetime = TimeSpan.FromSeconds(1.5); 
     97        } 
     98        if (ammus != null) 
     99        { 
     100            ammus.Size *= 1; 
     101            ammus.Image = ammuksenKuva; 
     102            ammus.MaximumLifetime = TimeSpan.FromSeconds(1.5); 
     103        } 
     104    } 
    69105} 
  • 2015/27/JesseS/VoltsTank/VoltsTank/VoltsTank/obj/x86/Debug/ContentPipeline-{2F24256F-9E1A-4769-8E9A-3FFC69AEE13C}.xml

    r6656 r6668  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>Ammus.png</Source> 
     6      <Name>Ammus</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\MyTemp\JesseS\VoltsTank\VoltsTank\VoltsTank\bin\x86\Debug\Content\Ammus.xnb</Output> 
     11      <Time>2015-07-01T13:16:01.1313355+03:00</Time> 
     12    </Item> 
    413    <BuildSuccessful>true</BuildSuccessful> 
    514    <Settings> 
     
    1625    <Assemblies> 
    1726      <Assembly> 
     27        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     28        <Value>2014-11-26T00:23:34+02:00</Value> 
     29      </Assembly> 
     30      <Assembly> 
     31        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     32        <Value>2011-09-01T16:22:30+03:00</Value> 
     33      </Assembly> 
     34      <Assembly> 
     35        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     36        <Value>2011-09-01T16:22:30+03:00</Value> 
     37      </Assembly> 
     38      <Assembly> 
     39        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     40        <Value>2011-09-01T16:22:30+03:00</Value> 
     41      </Assembly> 
     42      <Assembly> 
     43        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     44        <Value>2011-09-01T16:22:30+03:00</Value> 
     45      </Assembly> 
     46      <Assembly> 
     47        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     48        <Value>2011-09-01T16:22:30+03:00</Value> 
     49      </Assembly> 
     50      <Assembly> 
     51        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     52        <Value>2011-09-01T16:22:30+03:00</Value> 
     53      </Assembly> 
     54      <Assembly> 
     55        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     56        <Value>2014-11-26T00:23:36+02:00</Value> 
     57      </Assembly> 
     58      <Assembly> 
    1859        <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> 
    1960        <Value>2012-07-09T09:25:47.1768662+03:00</Value> 
  • 2015/27/JesseS/VoltsTank/VoltsTank/VoltsTank/obj/x86/Debug/VoltsTank.csproj.FileListAbsolute.txt

    r6656 r6668  
    77C:\MyTemp\JesseS\VoltsTank\VoltsTank\VoltsTank\obj\x86\Debug\VoltsTank.exe 
    88C:\MyTemp\JesseS\VoltsTank\VoltsTank\VoltsTank\obj\x86\Debug\VoltsTank.pdb 
     9C:\MyTemp\JesseS\VoltsTank\VoltsTank\VoltsTank\bin\x86\Debug\Content\Ammus.xnb 
  • 2015/27/JesseS/VoltsTank/VoltsTank/VoltsTankContent/VoltsTankContent.contentproj

    r6656 r6668  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="Ammus.png"> 
     49      <Name>Ammus</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
    4754  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4855  <!--  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.