Changeset 847 for 2010/23


Ignore:
Timestamp:
2010-06-15 11:31:58 (9 years ago)
Author:
hniemi
Message:

Grafiikkaa lisätty
Aseen vaihtaminen EI TOIMI (kaataa pelin)

Location:
2010/23/hniemi/ShootEmUp/ShootEmUp
Files:
17 added
5 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/Alus.cs

    r823 r847  
    5757        } 
    5858 
     59 
    5960        public void SetWeapon(Weapon ase)  
    6061        { 
    6162            if (kaytossaOlevaAse != null) kaytossaOlevaAse.Destroy(); 
     63            ase.IsVisible = false; 
    6264            this.Add(ase); 
    6365            kaytossaOlevaAse = ase; 
     
    6971        public void Shoot() 
    7072        { 
    71             if (kaytossaOlevaAse != null) 
    72             { 
    73                 kaytossaOlevaAse.Shoot().Angle = this.Angle; 
    74             } 
     73            PhysicsObject panos = kaytossaOlevaAse.Shoot(); 
     74            if ( panos != null) {  
     75                panos.Angle = this.Angle; 
     76            }  
     77             
    7578        } 
    7679 
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/Content/Content.contentproj

    r823 r847  
    2727  </ItemGroup> 
    2828  <ItemGroup> 
    29     <Compile Include="pelaajaAlus.png"> 
    30       <Name>pelaajaAlus</Name> 
     29    <Compile Include="vihollinen2.png"> 
     30      <Name>vihollinen2</Name> 
    3131      <Importer>TextureImporter</Importer> 
    3232      <Processor>TextureProcessor</Processor> 
     
    6161    </Compile> 
    6262  </ItemGroup> 
     63  <ItemGroup> 
     64    <Compile Include="sankarialus\sankarialusThrust1.png"> 
     65      <Name>sankarialusThrust1</Name> 
     66      <Importer>TextureImporter</Importer> 
     67      <Processor>TextureProcessor</Processor> 
     68    </Compile> 
     69  </ItemGroup> 
     70  <ItemGroup> 
     71    <Compile Include="sankarialus\sankarialusThrust2.png"> 
     72      <Name>sankarialusThrust2</Name> 
     73      <Importer>TextureImporter</Importer> 
     74      <Processor>TextureProcessor</Processor> 
     75    </Compile> 
     76  </ItemGroup> 
     77  <ItemGroup> 
     78    <Compile Include="sankarialus\sankarialusStop.png"> 
     79      <Name>sankarialusStop</Name> 
     80      <Importer>TextureImporter</Importer> 
     81      <Processor>TextureProcessor</Processor> 
     82    </Compile> 
     83  </ItemGroup> 
     84  <ItemGroup> 
     85    <Compile Include="sankarialus\sankarialusStopShield.png"> 
     86      <Name>sankarialusStopShield</Name> 
     87      <Importer>TextureImporter</Importer> 
     88      <Processor>TextureProcessor</Processor> 
     89    </Compile> 
     90  </ItemGroup> 
     91  <ItemGroup> 
     92    <Compile Include="vihollinen3.png"> 
     93      <Name>vihollinen3</Name> 
     94      <Importer>TextureImporter</Importer> 
     95      <Processor>TextureProcessor</Processor> 
     96    </Compile> 
     97  </ItemGroup> 
    6398  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    6499  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/Content/obj/x86/Debug/ContentPipeline.xml

    r823 r847  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
    4     <Item> 
    5       <Source>pelaajaAlus.png</Source> 
    6       <Name>pelaajaAlus</Name> 
    7       <Importer>TextureImporter</Importer> 
    8       <Processor>TextureProcessor</Processor> 
    9       <Options>None</Options> 
    10       <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\pelaajaAlus.xnb</Output> 
    11       <Time>2010-06-11T19:57:36+03:00</Time> 
    12     </Item> 
    134    <Item> 
    145      <Source>vihollinen1.png</Source> 
     
    4637      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\ohjus.xnb</Output> 
    4738      <Time>2010-06-14T15:13:56.2405151+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>vihollinen2.png</Source> 
     42      <Name>vihollinen2</Name> 
     43      <Importer>TextureImporter</Importer> 
     44      <Processor>TextureProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen2.xnb</Output> 
     47      <Time>2010-06-11T19:57:36+03:00</Time> 
     48    </Item> 
     49    <Item> 
     50      <Source>sankarialus\sankarialusThrust1.png</Source> 
     51      <Name>sankarialus\sankarialusThrust1</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust1.xnb</Output> 
     56      <Time>2010-06-15T09:37:30.7697918+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>sankarialus\sankarialusThrust2.png</Source> 
     60      <Name>sankarialus\sankarialusThrust2</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust2.xnb</Output> 
     65      <Time>2010-06-15T09:36:59.4334098+03:00</Time> 
     66    </Item> 
     67    <Item> 
     68      <Source>sankarialus\sankarialusStop.png</Source> 
     69      <Name>sankarialus\sankarialusStop</Name> 
     70      <Importer>TextureImporter</Importer> 
     71      <Processor>TextureProcessor</Processor> 
     72      <Options>None</Options> 
     73      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStop.xnb</Output> 
     74      <Time>2010-06-15T09:38:14.9813231+03:00</Time> 
     75    </Item> 
     76    <Item> 
     77      <Source>sankarialus\sankarialusStopShield.png</Source> 
     78      <Name>sankarialus\sankarialusStopShield</Name> 
     79      <Importer>TextureImporter</Importer> 
     80      <Processor>TextureProcessor</Processor> 
     81      <Options>None</Options> 
     82      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStopShield.xnb</Output> 
     83      <Time>2010-06-15T09:38:20.1289043+03:00</Time> 
     84    </Item> 
     85    <Item> 
     86      <Source>vihollinen3.png</Source> 
     87      <Name>vihollinen3</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90      <Options>None</Options> 
     91      <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen3.xnb</Output> 
     92      <Time>2010-06-15T11:22:42.3386343+03:00</Time> 
    4893    </Item> 
    4994    <BuildSuccessful>true</BuildSuccessful> 
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/Peli.cs

    r823 r847  
    1414         
    1515        //Liikkumisnopeudet 
    16         private const double nopeus = 300; 
    17         private Vector nopeusPysty = new Vector(0,nopeus); 
    18         private Vector nopeusVaaka = new Vector(nopeus, 0); 
     16        private const double NOPEUS = 300; 
     17        private Vector nopeusPysty = new Vector(0,NOPEUS); 
     18        private Vector nopeusVaaka = new Vector(NOPEUS, 0); 
    1919 
    2020        //Kentän rakenne 
     
    2727 
    2828        //Viholliset 
    29         private const int VIHOLLISKUVIA = 1; 
     29        private const int VIHOLLISKUVIA = 3; 
    3030 
    3131        //Statistiikka 
     
    7171            LataaKontrollit(pelaajaAlus); 
    7272            //LataaTausta(kentanNumero); 
    73             //LataaViholliset(); 
     73            LataaViholliset(); 
    7474            LataaHUD(); 
    7575        } 
     
    104104            pelaajaAlus = new Alus(40, 50, 10); 
    105105            pelaajaAlus.Shape = Shapes.Triangle; 
    106             pelaajaAlus.Image = LoadImage("pelaajaAlus"); 
     106            pelaajaAlus.Image = LoadImage("sankarialus/sankarialusStop"); 
    107107 
    108108            pelaajaAlus.Angle += Angle.Degrees(90); 
     
    121121            ((Missile)weapons[1]).MissileCollision = MissileOsuu; 
    122122 
    123             //Add(weapons[0]); 
    124             //Add(weapons[1]); 
     123            Add(pelaajaAlus); 
    125124            pelaajaAlus.SetWeapon(weapons[1]); 
    126             Add(pelaajaAlus); 
     125             
    127126            AddCollisionHandler(pelaajaAlus, PelaajaTormaa); 
    128127             
     
    158157        void Liikuta(Alus alus, Vector suunta) 
    159158        { 
    160             if (-nopeus < alus.Velocity.Y && alus.Velocity.Y < nopeus && suunta.Y != 0) 
     159            if (-NOPEUS < alus.Velocity.Y && alus.Velocity.Y < NOPEUS && suunta.Y != 0) 
    161160            { 
    162161                alus.Velocity += suunta; 
    163162            } 
    164             if (-nopeus < alus.Velocity.X && alus.Velocity.X < nopeus && suunta.X != 0) 
     163            if (-NOPEUS < alus.Velocity.X && alus.Velocity.X < NOPEUS && suunta.X != 0) 
    165164            { 
    166165                alus.Velocity += suunta; 
     
    372371        void MissileOsuu(PhysicsObject missile, PhysicsObject toinen) 
    373372        { 
    374             //missile.Destroy(); 
     373            if (toinen != pelaajaAlus) missile.Destroy(); 
    375374 
    376375            if (toinen.Tag.ToString() == "vihollinen") 
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/ShootEmUp.csproj.Debug.cachefile

    r823 r847  
    1 Content\pelaajaAlus.xnb 
    21Content\vihollinen1.xnb 
    32Content\ringout.xnb 
    43Content\pum.xnb 
    54Content\ohjus.xnb 
     5Content\vihollinen2.xnb 
     6Content\sankarialus\sankarialusThrust1.xnb 
     7Content\sankarialus\sankarialusThrust2.xnb 
     8Content\sankarialus\sankarialusStop.xnb 
     9Content\sankarialus\sankarialusStopShield.xnb 
     10Content\vihollinen3.xnb 
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/Weapons.cs

    r823 r847  
    8282        protected override PhysicsObject OnShoot() 
    8383        { 
    84             if (IsAddedToGame) Game.MessageDisplay.Add("Pelissä on"); 
    85             PhysicsObject projectile = new PhysicsObject(Level * 80, Level * 40); 
     84            PhysicsObject projectile = new PhysicsObject(Level * 30, Level * 15); 
    8685            projectile.Shape = Shapes.Triangle; 
    8786            projectile.Position = this.Position; 
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/obj/x86/Debug/ShootEmUp.csproj.FileListAbsolute.txt

    r823 r847  
    1111D:\Opiskelu\kurssit\NPO2010\ShootEmUp\ShootEmUp\obj\x86\Debug\ShootEmUp.csproj.GenerateResource.Cache 
    1212D:\Opiskelu\kurssit\NPO2010\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen1.xnb 
    13 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\pelaajaAlus.xnb 
    1413C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen1.xnb 
    1514C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\ShootEmUp.exe 
     
    2524C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\pum.xnb 
    2625C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\ohjus.xnb 
     26C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen2.xnb 
     27C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust1.xnb 
     28C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust2.xnb 
     29C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStop.xnb 
     30C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStopShield.xnb 
     31C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen3.xnb 
  • 2010/23/hniemi/ShootEmUp/ShootEmUp/obj/x86/Debug/cachefile-{72efbe00-2f1f-4e1d-9867-af4a5a7cd89e}-targetpath.txt

    r823 r847  
    1 Content\pelaajaAlus.xnb 
    21Content\vihollinen1.xnb 
    32Content\ringout.xnb 
    43Content\pum.xnb 
    54Content\ohjus.xnb 
     5Content\vihollinen2.xnb 
     6Content\sankarialus\sankarialusThrust1.xnb 
     7Content\sankarialus\sankarialusThrust2.xnb 
     8Content\sankarialus\sankarialusStop.xnb 
     9Content\sankarialus\sankarialusStopShield.xnb 
     10Content\vihollinen3.xnb 
Note: See TracChangeset for help on using the changeset viewer.