Changeset 6779 for 2015/27


Ignore:
Timestamp:
2015-07-03 11:28:49 (8 years ago)
Author:
jivesuor
Message:

Ammukset eivät tuhoa kolikoita tai palikoita. XBOX-ohjaimen värinää vähennetty.
Ammuksille lisätty näyttö.

Location:
2015/27/JimiS
Files:
6 added
12 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.cs

    r6770 r6779  
    4040    Image PaaVihu = LoadImage("Päävihollinen"); 
    4141    Image rajahdyskuva = LoadImage("rajahdys"); 
    42     Image ammukset = LoadImage("ammukset"); 
     42    Image abcd = LoadImage("ammukset"); 
    4343    Image punainen = LoadImage("punainentaso"); 
     44    Image elama = LoadImage("elama"); 
    4445 
    4546 
     
    140141        //} 
    141142 
    142         Level.Background.CreateGradient(Color.LightGreen, Color.SkyBlue); 
     143        Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
    143144    } 
    144145 
     
    150151        paavihu.Image = PaaVihu; 
    151152        Add(paavihu); 
     153        paavihu.CollisionIgnoreGroup = 3; 
    152154 
    153155        PlatformWandererBrain paavihuaivot = new PlatformWandererBrain(); 
     
    166168        pahis.Image = pahiskuva; 
    167169        Add(pahis); 
     170        pahis.CollisionIgnoreGroup = 3; 
    168171 
    169172        PlatformWandererBrain pahisaivot = new PlatformWandererBrain(); 
     
    182185        vihu.Image = vihukuva; 
    183186        Add(vihu); 
     187        vihu.CollisionIgnoreGroup = 3; 
    184188 
    185189        PlatformWandererBrain tasoaivot = new PlatformWandererBrain(); 
     
    199203        maa.Image = MaaPalikka; 
    200204        Add(maa); 
     205        maa.CollisionIgnoreGroup = 2; 
    201206    } 
    202207 
     
    207212        palikka.Image = punainen; 
    208213        Add(palikka); 
     214        palikka.CollisionIgnoreGroup = 2; 
    209215    } 
    210216 
     
    216222        taso.Image = tasokuva; 
    217223        Add(taso); 
     224        taso.CollisionIgnoreGroup = 2; 
    218225    } 
    219226 
     
    226233        kolikko.Tag = "tahti"; 
    227234        Add(kolikko); 
     235        kolikko.CollisionIgnoreGroup = 2; 
    228236    } 
    229237 
     
    232240        PhysicsObject ammo = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    233241        ammo.Position = paikka; 
    234         ammo.Image = ammukset; 
     242        ammo.Image = abcd; 
    235243        ammo.Tag = "ammo"; 
    236244        Add(ammo); 
     
    262270        pelaaja1.Weapon.IsVisible = false; 
    263271 
    264         pelaaja1.Weapon.ProjectileCollision = AmmusOsuivihuun; 
    265         pelaaja1.Weapon.ProjectileCollision = AmmusOsuipahikseen; 
    266         //pelaaja1.Weapon.ProjectileCollision = AmmusOsuiPahikseen; 
     272        pelaaja1.Weapon.ProjectileCollision = AmmusOsui; 
     273        
     274 
    267275 
    268276 
     
    283291        Add(tahdet); 
    284292 
     293 
     294        Label ammukset = new Label(); 
     295        ammukset.BindTo(pelaaja1.Weapon.Ammo); 
     296        ammukset.Y += pelaaja1.Height; 
     297        ammukset.X += 20; 
     298        ammukset.TextColor = Color.Black; 
     299        ammukset.BorderColor = Color.Black; 
     300        ammukset.Color = Color.White; 
     301        ammukset.Image = abcd; 
     302        ammukset.Width *= 1.5; 
     303        pelaaja1.Add(ammukset); 
     304 
     305 
    285306        pelaajan1Elamat = new IntMeter(5); 
    286307        pelaajan1Elamat.MaxValue = 20; 
     
    289310 
    290311        naytto.Y += pelaaja1.Height; 
     312        naytto.X -= 20; 
    291313        naytto.TextColor = Color.Black; 
    292314        naytto.BorderColor = Color.Black; 
    293315        naytto.Color = Color.White; 
    294         naytto.Size *= 0.5; 
    295         naytto.TextScale = new Vector(0.5, 0.5); 
     316        naytto.Image = elama; 
     317        naytto.Width *= 2; 
     318        //naytto.Size *= 1; 
     319        //naytto.TextScale = new Vector(0.5, 0.5); 
    296320        pelaaja1.Add(naytto); 
    297321    } 
     
    300324    { 
    301325        PhysicsObject ammus = pelaaja.Weapon.Shoot(); 
    302         ControllerOne.Vibrate(2.5, 2.5, 5.0, 5.0, 0.5); 
     326        ControllerOne.Vibrate(1.0, 1.0, 5.0, 5.0, 0.5); 
    303327 
    304328        if (ammus != null) 
    305329        { 
    306  
     330            ammus.CollisionIgnoreGroup = 2; 
    307331        } 
    308332    } 
    309333 
    310     void AmmusOsuivihuun(PhysicsObject ammus, PhysicsObject vihu) 
     334    void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 
    311335    { 
    312336        ammus.Destroy(); 
    313         vihu.Destroy(); 
    314     } 
    315  
    316     void AmmusOsuipahikseen(PhysicsObject ammus, PhysicsObject pahis) 
    317     { 
    318         ammus.Destroy(); 
    319         pahis.Destroy(); 
    320     } 
    321  
    322     void AmmusOsuipaavihuun(PhysicsObject ammus, PhysicsObject PaaVihu) 
    323     { 
    324         ammus.Destroy(); 
    325          
     337        kohde.Destroy(); 
    326338    } 
    327339 
     
    330342        MessageDisplay.Add("Auts! Törmäsit Vihuun!"); 
    331343 
    332         ControllerOne.Vibrate(2.5, 2.5, 0.0, 0.0, 0.5); 
     344        ControllerOne.Vibrate(1.0, 1.0, 0.0, 0.0, 0.5); 
    333345 
    334346        PlaySound("osuma"); 
     
    341353        { 
    342354            pelaaja1.Destroy(); 
    343             ControllerOne.Vibrate(2.5, 2.5, 0.0, 0.0, 2.0); 
     355            ControllerOne.Vibrate(1.0, 1.0, 0.0, 0.0, 2.0); 
    344356            MessageDisplay.Add("Pelaaja 1 hävisi pelin."); 
    345357            toplista.EnterAndShow(pelaajan1Tahdet.Value); 
     
    365377            pelaaja1.Destroy(); 
    366378            MessageDisplay.Add("Pelaaja 1 hävisi pelin."); 
    367             ControllerOne.Vibrate(2.5, 2.5, 0.0, 0.0, 2.0); 
     379            ControllerOne.Vibrate(1.0, 1.0, 0.0, 0.0, 2.0); 
    368380            toplista.EnterAndShow(pelaajan1Tahdet.Value); 
    369381            toplista.HighScoreWindow.Closed += toplistapois; 
     
    432444        MessageDisplay.Add("Keräsit 5 ammusta!"); 
    433445 
    434         ExplosionSystem rajahdys = new ExplosionSystem(ammukset, pMaxMaara); 
     446        ExplosionSystem rajahdys = new ExplosionSystem(abcd, pMaxMaara); 
    435447 
    436448        double x = ammo.X; 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.csproj

    r6572 r6779  
    1919    <ApplicationIcon>Game.ico</ApplicationIcon> 
    2020    <Thumbnail>GameThumbnail.png</Thumbnail> 
     21    <IsWebBootstrapper>false</IsWebBootstrapper> 
     22    <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 
    2123    <PublishUrl>publish\</PublishUrl> 
    2224    <Install>true</Install> 
     
    3133    <ApplicationRevision>0</ApplicationRevision> 
    3234    <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 
    33     <IsWebBootstrapper>false</IsWebBootstrapper> 
    3435    <UseApplicationTrust>false</UseApplicationTrust> 
    3536    <BootstrapperEnabled>true</BootstrapperEnabled> 
    36     <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 
    3737  </PropertyGroup> 
    3838  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.csproj.Debug.cachefile

    r6764 r6779  
    1919Content\pelimusiikkibyJimi.xnb 
    2020Content\taustakuva.xnb 
     21Content\elama.xnb 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/ContentPipeline-{9937689A-33E5-40B9-A7B6-3F1206C3B37D}.xml

    r6764 r6779  
    181181      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\taustakuva.xnb</Output> 
    182182      <Time>2015-07-02T14:39:10.5227735+03:00</Time> 
     183    </Item> 
     184    <Item> 
     185      <Source>elama.png</Source> 
     186      <Name>elama</Name> 
     187      <Importer>TextureImporter</Importer> 
     188      <Processor>TextureProcessor</Processor> 
     189      <Options>None</Options> 
     190      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\elama.xnb</Output> 
     191      <Time>2015-07-03T11:18:22.9446316+03:00</Time> 
    183192    </Item> 
    184193    <BuildSuccessful>true</BuildSuccessful> 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/cachefile-{9937689A-33E5-40B9-A7B6-3F1206C3B37D}-targetpath.txt

    r6764 r6779  
    1919Content\pelimusiikkibyJimi.xnb 
    2020Content\taustakuva.xnb 
     21Content\elama.xnb 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/hyppely.csproj.FileListAbsolute.txt

    r6764 r6779  
    2727C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\pelimusiikkibyJimi.xnb 
    2828C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\taustakuva.xnb 
     29C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\elama.xnb 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppelyContent/hyppelyContent.contentproj

    r6764 r6779  
    179179    </Compile> 
    180180  </ItemGroup> 
     181  <ItemGroup> 
     182    <Compile Include="elama.png"> 
     183      <Name>elama</Name> 
     184      <Importer>TextureImporter</Importer> 
     185      <Processor>TextureProcessor</Processor> 
     186    </Compile> 
     187  </ItemGroup> 
    181188  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    182189  <!--  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.