Changeset 8715 for 2017/24


Ignore:
Timestamp:
2017-06-15 13:13:45 (2 years ago)
Author:
npo17_19
Message:

VALMIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Location:
2017/24/VihantiK/TrumpTheGame/TrumpTheGame
Files:
28 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/VihantiK/TrumpTheGame/TrumpTheGame/TrumpTheGame.sln

    r8664 r8715  
    44VisualStudioVersion = 14.0.23107.0 
    55MinimumVisualStudioVersion = 10.0.40219.1 
    6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EtsiTähtiNäytönYläreunasta", "TrumpTheGame\TrumpTheGame\EtsiTähtiNäytönYläreunasta.csproj", "{FD0A69FD-B3D0-4067-8558-8859B2F4F549}" 
     6Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bouncer", "TrumpTheGame\TrumpTheGame\Bouncer.csproj", "{FD0A69FD-B3D0-4067-8558-8859B2F4F549}" 
    77EndProject 
    88Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrumpTheGameContent", "TrumpTheGame\TrumpTheGameContent\TrumpTheGameContent.contentproj", "{ECDC6D83-C7C7-47F1-936F-BE0F3C819C76}" 
  • 2017/24/VihantiK/TrumpTheGame/TrumpTheGame/TrumpTheGame/TrumpTheGame/TrumpTheGame.cs

    r8664 r8715  
    1111    Image ukko = LoadImage("ukko"); 
    1212    PhysicsObject picture; 
     13    PhysicsObject oikeeMaali; 
    1314    public override void Begin() 
    1415    { 
    1516        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    1617        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    17         Level.Background.Color = Color.Emerald; 
     18        Level.Background.Color = Color.Lavender; 
    1819        SmoothTextures = (false); 
    1920        //Level.CreateBorders(1.0, false); 
    20         //Gravity = new Vector(0.0, -250); 
     21        Gravity = new Vector(0.0, -1000.0); 
    2122        AsetaOhjaimet(); 
    2223        LuoKentta(); 
     24        MediaPlayer.Play("shooting star"); 
    2325    } 
    2426    void LuoKentta() 
     
    2729        kentta.SetTileMethod('#', palikka); 
    2830        kentta.SetTileMethod('P', luohahmo); 
    29         kentta.Execute(20.0, 20.0); 
     31        kentta.SetTileMethod('M', maali); 
     32        kentta.SetTileMethod('O', OikeeMaali); 
     33        kentta.Execute(100.0, 100.0); 
     34        Camera.ZoomToLevel(10.0); 
     35        Level.Background.Image = LoadImage("34r50f"); 
     36        Level.Background.FitToLevel(); 
    3037 
    3138    } 
    3239    void luohahmo(Vector paikka, double korkeus, double leveys) 
    3340    { 
    34         picture = new PhysicsObject(korkeus, leveys); 
     41        picture = new PhysicsObject(150.0, 150.0); 
    3542        picture.Image = ukko; 
     43        picture.Position = paikka; 
    3644        Add(picture); 
     45        picture.CanRotate = false; 
     46        AddCollisionHandler(picture, "maali", OsuuMaaliin); 
     47        AddCollisionHandler(picture, "muaali", OsuuOikeaanMaaliin); 
    3748    } 
    3849    void palikka(Vector paikka, double korkeus, double leveys) 
    3950    { 
    4051        PhysicsObject palikka = PhysicsObject.CreateStaticObject(korkeus, leveys); 
     52        palikka.Position = paikka; 
    4153        Add(palikka); 
    4254    } 
     55    void maali(Vector paikka, double korkeus, double leveys) 
     56    { 
     57        PhysicsObject maali = PhysicsObject.CreateStaticObject(korkeus, leveys*2); 
     58        maali.Position = paikka; 
     59        maali.Image = LoadImage("lippu"); 
     60        maali.Tag = "maali"; 
     61        Add(maali); 
     62    } 
     63    void OikeeMaali(Vector paikka, double korkeus, double leveys) 
     64    { 
     65        oikeeMaali = PhysicsObject.CreateStaticObject(korkeus, leveys); 
     66        oikeeMaali.Position = paikka; 
     67        oikeeMaali.Tag = "muaali"; 
     68        Add(oikeeMaali); 
     69    } 
     70    void uusipeli() 
     71    { 
     72        ClearAll(); 
     73        Begin(); 
     74    } 
     75    void OsuuMaaliin(PhysicsObject pelaaja, PhysicsObject maali) 
     76    { 
     77        Explosion räjähdys = new Explosion(2000.0); 
     78        räjähdys.Position = maali.Position; 
     79        räjähdys.Speed = 1000; 
     80        räjähdys.Image = LoadImage("rolli feis"); 
     81        Add(räjähdys); 
     82        Timer.SingleShot(3, uusipeli); 
     83    } 
     84    void OsuuOikeaanMaaliin(PhysicsObject pelaaja, PhysicsObject maali) 
     85    { 
     86        Explosion räjähdys = new Explosion(1000.0); 
     87        räjähdys.Position = oikeeMaali.Position; 
     88        räjähdys.Speed = 1000; 
     89        räjähdys.Image = LoadImage("voitit"); 
     90        Add(räjähdys); 
     91        Timer.SingleShot(3, uusipeli); 
     92    } 
     93 
    4394        void AsetaOhjaimet() 
    4495    { 
    45  
    46         Keyboard.Listen(Key.W, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko ylös", picture, new Vector(0.0, 300.0)); 
     96        Keyboard.Listen(Key.W, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko ylös", picture, new Vector(0.0, 1500.0)); 
    4797        Keyboard.Listen(Key.W, ButtonState.Released, AsetaNopeus, null, picture, Vector.Zero); 
    48         Keyboard.Listen(Key.S, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko alas", picture, new Vector(0.0, -300)); 
     98        Keyboard.Listen(Key.S, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko alas", picture, new Vector(0.0, -1500)); 
    4999        Keyboard.Listen(Key.S, ButtonState.Released, AsetaNopeus, null, picture, Vector.Zero); 
    50         Keyboard.Listen(Key.A, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko vasemmalle", picture, new Vector(-300.0, 0.0)); 
     100        Keyboard.Listen(Key.A, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko vasemmalle", picture, new Vector(-1500.0, 0.0)); 
    51101        Keyboard.Listen(Key.A, ButtonState.Released, AsetaNopeus, null, picture, Vector.Zero); 
    52         Keyboard.Listen(Key.D, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko oikealle", picture, new Vector(300.0, 0.0)); 
     102        Keyboard.Listen(Key.D, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta ukko oikealle", picture, new Vector(1500.0, 0.0)); 
    53103        Keyboard.Listen(Key.D, ButtonState.Released, AsetaNopeus, null, picture, Vector.Zero); 
    54104 
     
    57107    void AsetaNopeus(PhysicsObject maila, Vector nopeus) 
    58108    { 
    59         maila.Push(nopeus); 
     109        picture.Velocity = nopeus; 
    60110    } 
    61111 
  • 2017/24/VihantiK/TrumpTheGame/TrumpTheGame/TrumpTheGame/TrumpTheGame/obj/x86/Debug/ContentPipeline-{ECDC6D83-C7C7-47F1-936F-BE0F3C819C76}.xml

    r8664 r8715  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
    4     <Item> 
    5       <Source>ukko.png</Source> 
    6       <Name>ukko</Name> 
    7       <Importer>TextureImporter</Importer> 
    8       <Processor>TextureProcessor</Processor> 
    9       <Options>None</Options> 
    10       <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\ukko.xnb</Output> 
    11       <Time>2017-06-14T10:46:24.2990584+03:00</Time> 
    12     </Item> 
    134    <Item> 
    145      <Source>jtn.txt</Source> 
     
    2718      <Options>None</Options> 
    2819      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\jtn2.xnb</Output> 
    29       <Time>2017-06-14T14:56:03.7477446+03:00</Time> 
     20      <Time>2017-06-15T12:50:24.0195697+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>rolli feis.png</Source> 
     24      <Name>rolli feis</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\rolli feis.xnb</Output> 
     29      <Time>2017-06-15T11:24:15.3780089+03:00</Time> 
     30    </Item> 
     31    <Item> 
     32      <Source>ukko.png</Source> 
     33      <Name>ukko</Name> 
     34      <Importer>TextureImporter</Importer> 
     35      <Processor>TextureProcessor</Processor> 
     36      <Options>None</Options> 
     37      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\ukko.xnb</Output> 
     38      <Time>2017-06-15T11:28:27.2521285+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>lippu.png</Source> 
     42      <Name>lippu</Name> 
     43      <Importer>TextureImporter</Importer> 
     44      <Processor>TextureProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\lippu.xnb</Output> 
     47      <Time>2017-06-15T11:32:48.6042485+03:00</Time> 
     48    </Item> 
     49    <Item> 
     50      <Source>34r50f.png</Source> 
     51      <Name>34r50f</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\34r50f.xnb</Output> 
     56      <Time>2017-06-15T11:37:17.2944189+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>voitit.png</Source> 
     60      <Name>voitit</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\voitit.xnb</Output> 
     65      <Time>2017-06-15T11:52:55.0601748+03:00</Time> 
     66    </Item> 
     67    <Item> 
     68      <Source>shooting star.mp3</Source> 
     69      <Name>shooting star</Name> 
     70      <Importer>Mp3Importer</Importer> 
     71      <Processor>SongProcessor</Processor> 
     72      <Options>None</Options> 
     73      <Output>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\shooting star.xnb</Output> 
     74      <Extra>C:\MyTemp\VihantiK\TrumpTheGame\TrumpTheGame\TrumpTheGame\TrumpTheGame\bin\x86\Debug\Content\shooting star.wma</Extra> 
     75      <Time>2017-06-15T12:55:23.7423379+03:00</Time> 
    3076    </Item> 
    3177    <BuildSuccessful>true</BuildSuccessful> 
  • 2017/24/VihantiK/TrumpTheGame/TrumpTheGame/TrumpTheGame/TrumpTheGameContent/TrumpTheGameContent.contentproj

    r8664 r8715  
    4646  </ItemGroup> 
    4747  <ItemGroup> 
    48     <Compile Include="ukko.png"> 
    49       <Name>ukko</Name> 
    50       <Importer>TextureImporter</Importer> 
    51       <Processor>TextureProcessor</Processor> 
    52       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    53     </Compile> 
    54   </ItemGroup> 
    55   <ItemGroup> 
    5648    <Compile Include="jtn.txt"> 
    5749      <Name>jtn</Name> 
     
    6860    </Compile> 
    6961  </ItemGroup> 
     62  <ItemGroup> 
     63    <Compile Include="rolli feis.png"> 
     64      <Name>rolli feis</Name> 
     65      <Importer>TextureImporter</Importer> 
     66      <Processor>TextureProcessor</Processor> 
     67    </Compile> 
     68  </ItemGroup> 
     69  <ItemGroup> 
     70    <Compile Include="ukko.png"> 
     71      <Name>ukko</Name> 
     72      <Importer>TextureImporter</Importer> 
     73      <Processor>TextureProcessor</Processor> 
     74    </Compile> 
     75  </ItemGroup> 
     76  <ItemGroup> 
     77    <Compile Include="lippu.png"> 
     78      <Name>lippu</Name> 
     79      <Importer>TextureImporter</Importer> 
     80      <Processor>TextureProcessor</Processor> 
     81    </Compile> 
     82  </ItemGroup> 
     83  <ItemGroup> 
     84    <Compile Include="34r50f.png"> 
     85      <Name>34r50f</Name> 
     86      <Importer>TextureImporter</Importer> 
     87      <Processor>TextureProcessor</Processor> 
     88    </Compile> 
     89  </ItemGroup> 
     90  <ItemGroup> 
     91    <Compile Include="voitit.png"> 
     92      <Name>voitit</Name> 
     93      <Importer>TextureImporter</Importer> 
     94      <Processor>TextureProcessor</Processor> 
     95    </Compile> 
     96  </ItemGroup> 
     97  <ItemGroup> 
     98    <Compile Include="shooting star.mp3"> 
     99      <Name>shooting star</Name> 
     100      <Importer>Mp3Importer</Importer> 
     101      <Processor>SongProcessor</Processor> 
     102    </Compile> 
     103  </ItemGroup> 
    70104  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    71105  <!--  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.