Changeset 7498 for 2016/25/AaroV


Ignore:
Timestamp:
2016-06-23 13:12:58 (7 years ago)
Author:
koannak
Message:
 
Location:
2016/25/AaroV
Files:
17 added
11 edited

Legend:

Unmodified
Added
Removed
  • 2016/25/AaroV/Tankz/Tankz/Tankz/Tankz.cs

    r7489 r7498  
    1212    Tankki tankki2; 
    1313    Tankki tankki3; 
     14    SoundEffect tykinaani = LoadSoundEffect("Explosion28"); 
     15    Image tankinkuva = LoadImage("epicTankkipohja"); 
     16    Image tankintykki = LoadImage("epitankkiTykki"); 
     17    Image TankinAmmus = LoadImage("Ammus"); 
    1418    public override void Begin() 
    1519    { 
     
    4246        if (tankki.ElamaLaskuri.Value == 0) return; 
    4347        Vector suunta = Vector.FromLengthAndAngle(tankki.tykki.Width, tankki.tykki.AbsoluteAngle); 
    44         PhysicsObject ammus = new PhysicsObject(10, 2); 
     48        PhysicsObject ammus = new PhysicsObject(17, 5); 
    4549        ammus.Position = tankki.Position + suunta; 
    4650        ammus.CollisionIgnoreGroup = tankki.CollisionIgnoreGroup; 
    4751        ammus.Angle = tankki.tykki.AbsoluteAngle ; 
    4852        Add(ammus); 
     53        ammus.Image = TankinAmmus; 
    4954        ammus.Tag = "ammus"; 
    5055        AddCollisionHandler(ammus, CollisionHandler.DestroyObject); 
    5156        ammus.LifetimeLeft = TimeSpan.FromSeconds(4); 
    52         ammus.Velocity = Vector.FromLengthAndAngle(850, tankki.tykki.AbsoluteAngle ) ; 
     57        ammus.Velocity = Vector.FromLengthAndAngle(875, tankki.tykki.AbsoluteAngle ) ; 
     58        tykinaani.Play(); 
    5359    } 
    5460    Tankki Luotankki(Double X, Double Y,int tormausryhma) { 
    55        Tankki tankki = new Tankki(30, 30); 
     61       Tankki tankki = new Tankki(60, 30,tankintykki); 
    5662        tankki.CollisionIgnoreGroup = tormausryhma; 
    5763        Add(tankki); 
     
    5965        tankki.Y = Y; 
    6066        tankki.Mass = 5; 
    61  
     67        tankki.Image = tankinkuva; 
    6268 
    6369        AddCollisionHandler(tankki, "ammus", tankkiinosui); 
     
    6975        Tankki pelaaja = (Tankki)tankki; 
    7076        pelaaja.ElamaLaskuri.Value--; 
    71          
     77 
     78        int tankkeja = 0; 
     79        tankkeja += this.tankki.ElamaLaskuri.Value > 0 ? 1 : 0; 
     80        tankkeja += this.tankki2.ElamaLaskuri.Value > 0 ? 1 : 0; 
     81 
     82        tankkeja += this.tankki3.ElamaLaskuri.Value > 0 ? 1 : 0; 
     83 
     84        if(tankkeja <= 1) 
     85        { 
     86            ClearAll(); 
     87            Begin(); 
     88        } 
     89 
     90 
    7291    } 
    7392} 
     
    7998    public GameObject tykki { get; set; } 
    8099    public Double kulma { get; set; } 
    81     public Tankki(double leveys, double korkeus) 
     100    public Tankki(double leveys, double korkeus,Image tykinkuva) 
    82101        : base(leveys, korkeus) 
    83102    { 
    84103        elamaLaskuri.LowerLimit += delegate { this.Destroy(); }; 
    85104        tykki = new GameObject(this.Width / 1.5, this.Width / 5.0); 
     105        tykki.Image = tykinkuva; 
    86106        Add(tykki); 
    87107        IsUpdated = true; 
     
    90110    public override void Update(Time time) 
    91111    { 
    92         tykki.Position = Vector.FromLengthAndAngle(tykki.Width * 1, Angle.FromDegrees(kulma)); 
     112        tykki.Position = new Vector(0, 10) + Vector.FromLengthAndAngle(tykki.Width * 0.52, Angle.FromDegrees(kulma)); 
    93113        tykki.Angle = Angle.FromDegrees(kulma); 
    94114 
    95115        base.Update(time); 
    96116 
     117       
    97118    } 
    98119} 
  • 2016/25/AaroV/Tankz/Tankz/Tankz/Tankz.csproj

    r7473 r7498  
    1919    <ApplicationIcon>Game.ico</ApplicationIcon> 
    2020    <Thumbnail>GameThumbnail.png</Thumbnail> 
    21     <PublishUrl>publish\</PublishUrl> 
     21    <IsWebBootstrapper>false</IsWebBootstrapper> 
     22    <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 
     23    <PublishUrl>C:\Users\ohjelmointi\Documents\AaroV\TankZInstall\</PublishUrl> 
    2224    <Install>true</Install> 
    2325    <InstallFrom>Disk</InstallFrom> 
     
    2931    <UpdateRequired>false</UpdateRequired> 
    3032    <MapFileExtensions>true</MapFileExtensions> 
     33    <AutorunEnabled>true</AutorunEnabled> 
    3134    <ApplicationRevision>0</ApplicationRevision> 
    3235    <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 
    33     <IsWebBootstrapper>false</IsWebBootstrapper> 
    3436    <UseApplicationTrust>false</UseApplicationTrust> 
     37    <PublishWizardCompleted>true</PublishWizardCompleted> 
    3538    <BootstrapperEnabled>true</BootstrapperEnabled> 
    36     <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 
    3739  </PropertyGroup> 
    3840  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 
     
    6062    <PlatformTarget>x86</PlatformTarget> 
    6163    <XnaCompressContent>true</XnaCompressContent> 
     64  </PropertyGroup> 
     65  <PropertyGroup> 
     66    <ManifestCertificateThumbprint>2BBA2FD43373C686824B8E2E3D78C782842BE4CD</ManifestCertificateThumbprint> 
     67  </PropertyGroup> 
     68  <PropertyGroup> 
     69    <ManifestKeyFile>Tankz_TemporaryKey.pfx</ManifestKeyFile> 
     70  </PropertyGroup> 
     71  <PropertyGroup> 
     72    <GenerateManifests>true</GenerateManifests> 
     73  </PropertyGroup> 
     74  <PropertyGroup> 
     75    <SignManifests>true</SignManifests> 
    6276  </PropertyGroup> 
    6377  <ItemGroup> 
     
    152166    </BootstrapperPackage> 
    153167  </ItemGroup> 
     168  <ItemGroup> 
     169    <None Include="Tankz_TemporaryKey.pfx" /> 
     170  </ItemGroup> 
    154171  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 
    155172  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" /> 
  • 2016/25/AaroV/Tankz/Tankz/Tankz/obj/x86/Debug/ContentPipeline-{05F528B4-78AE-4163-AFAA-5A3FFD0B61AC}.xml

    r7473 r7498  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>epicTankkipohja.png</Source> 
     6      <Name>epicTankkipohja</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\epicTankkipohja.xnb</Output> 
     11      <Time>2016-06-23T10:48:12.1056394+03:00</Time> 
     12    </Item> 
     13    <Item> 
     14      <Source>epitankkiTykki.png</Source> 
     15      <Name>epitankkiTykki</Name> 
     16      <Importer>TextureImporter</Importer> 
     17      <Processor>TextureProcessor</Processor> 
     18      <Options>None</Options> 
     19      <Output>C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\epitankkiTykki.xnb</Output> 
     20      <Time>2016-06-23T10:46:19.4411846+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>Explosion28.wav</Source> 
     24      <Name>Explosion28</Name> 
     25      <Importer>WavImporter</Importer> 
     26      <Processor>SoundEffectProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\Explosion28.xnb</Output> 
     29      <Time>2016-06-23T11:06:45.8777583+03:00</Time> 
     30    </Item> 
     31    <Item> 
     32      <Source>Ammus.jpg</Source> 
     33      <Name>Ammus</Name> 
     34      <Importer>TextureImporter</Importer> 
     35      <Processor>TextureProcessor</Processor> 
     36      <Options>None</Options> 
     37      <Output>C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\Ammus.xnb</Output> 
     38      <Time>2016-06-23T11:38:08.9049095+03:00</Time> 
     39    </Item> 
    440    <BuildSuccessful>true</BuildSuccessful> 
    541    <Settings> 
     
    1652    <Assemblies> 
    1753      <Assembly> 
     54        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     55        <Value>2016-03-29T10:06:40+03:00</Value> 
     56      </Assembly> 
     57      <Assembly> 
     58        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     59        <Value>2011-09-01T16:22:30+03:00</Value> 
     60      </Assembly> 
     61      <Assembly> 
     62        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     63        <Value>2011-09-01T16:22:30+03:00</Value> 
     64      </Assembly> 
     65      <Assembly> 
     66        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     67        <Value>2011-09-01T16:22:30+03:00</Value> 
     68      </Assembly> 
     69      <Assembly> 
     70        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     71        <Value>2011-09-01T16:22:30+03:00</Value> 
     72      </Assembly> 
     73      <Assembly> 
     74        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     75        <Value>2011-09-01T16:22:30+03:00</Value> 
     76      </Assembly> 
     77      <Assembly> 
     78        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     79        <Value>2011-09-01T16:22:30+03:00</Value> 
     80      </Assembly> 
     81      <Assembly> 
     82        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     83        <Value>2016-03-29T10:06:38+03:00</Value> 
     84      </Assembly> 
     85      <Assembly> 
    1886        <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> 
    1987        <Value>2016-06-06T10:02:05.599392+03:00</Value> 
  • 2016/25/AaroV/Tankz/Tankz/Tankz/obj/x86/Debug/Tankz.csproj.FileListAbsolute.txt

    r7477 r7498  
    77C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\obj\x86\Debug\Tankz.pdb 
    88C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\obj\x86\Debug\Tankz.csprojResolveAssemblyReference.cache 
     9C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\epicTankkipohja.xnb 
     10C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\epitankkiTykki.xnb 
     11C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\Explosion28.xnb 
     12C:\Users\ohjelmointi\Documents\AaroV\Tankz\Tankz\Tankz\bin\x86\Debug\Content\Ammus.xnb 
  • 2016/25/AaroV/Tankz/Tankz/TankzContent/TankzContent.contentproj

    r7473 r7498  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="epicTankkipohja.png"> 
     49      <Name>epicTankkipohja</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="epitankkiTykki.png"> 
     56      <Name>epitankkiTykki</Name> 
     57      <Importer>TextureImporter</Importer> 
     58      <Processor>TextureProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
     61  <ItemGroup> 
     62    <Compile Include="Explosion28.wav"> 
     63      <Name>Explosion28</Name> 
     64      <Importer>WavImporter</Importer> 
     65      <Processor>SoundEffectProcessor</Processor> 
     66    </Compile> 
     67  </ItemGroup> 
     68  <ItemGroup> 
     69    <Compile Include="Ammus.jpg"> 
     70      <Name>Ammus</Name> 
     71      <Importer>TextureImporter</Importer> 
     72      <Processor>TextureProcessor</Processor> 
     73    </Compile> 
     74  </ItemGroup> 
    4775  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4876  <!--  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.