Changeset 6015 for 2015/24


Ignore:
Timestamp:
2015-06-11 11:35:35 (4 years ago)
Author:
otoskinn
Message:
 
Location:
2015/24/OttoK/Grand Theft Norsu II
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II.csproj.Debug.cachefile

    r5987 r6015  
    44Content\tahti.xnb 
    55Content\kaupunkitausta.xnb 
    6 Content\auto1kuva.xnb 
    7 Content\kursori1.xnb 
    86Content\panos.xnb 
    97Content\liekki.xnb 
    108Content\rajahdys_kuva.xnb 
     9Content\auto1.xnb 
     10Content\tyyppi.xnb 
    1111Content\kentta1.txt 
     12Content\panos.png 
     13Content\liekki.png 
     14Content\rajahdys_kuva.png 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand_Theft_Norsu_II.cs

    r5987 r6015  
    2222    Image pelaajanKuva = LoadImage("norsu"); 
    2323    Image tahtiKuva = LoadImage("tahti"); 
    24     Image auto1kuva = LoadImage("auto1kuva"); 
     24    Image auto12 = LoadImage("auto1"); 
    2525    Image kursorinkuva = LoadImage("kursori1"); 
    2626    Image panoksenkuba = LoadImage("panos"); 
    2727    Image liekinkuva = LoadImage("liekki"); 
    2828    Image rajahdys_kuva = LoadImage("rajahdys_kuva"); 
     29    Image tyyppikuva = LoadImage("tyyppi"); 
    2930 
    3031    double hyppykerroin = 1.0; 
     
    3334    ExplosionSystem rajahdys; 
    3435 
    35  
    3636    SoundEffect maaliAani = LoadSoundEffect("maali"); 
    3737 
     
    4141    { 
    4242        IsFullScreen = false; 
    43         SetWindowSize(1024, 768, true);  
     43        SetWindowSize(1024, 768);  
    4444        Gravity = new Vector(0, -1000); 
    45          
    46  
    4745 
    4846        Mouse.IsCursorVisible = true; 
     
    5452        LuoKentta(); 
    5553        LisaaNappaimet(); 
    56  
    5754        Camera.Follow(pelaaja1); 
    5855        Camera.ZoomFactor = 1.2; 
    5956        Camera.StayInLevel = false; 
    6057    } 
    61  
    6258    void LuoKentta() 
    6359    { 
     
    6763        kentta.SetTileMethod('N', LisaaPelaaja); 
    6864        kentta.SetTileMethod('A', LuoAuto); 
     65        kentta.SetTileMethod('T', LuoTyyppi); 
    6966        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    7067        Level.CreateBorders(); 
     
    118115        pelaaja1.Add(pelaajan1Ase); 
    119116        Add(pelaaja1); 
    120        
    121  
    122  
    123117         
    124118    } 
    125119    void MeneAutoon(PhysicsObject auto) 
    126120    { 
    127         pelaaja1.Image = auto1kuva; 
     121        pelaaja1.Image = auto12; 
    128122        //pelaaja1.Shape = Shape.FromImage(auto1kuva); 
    129123 
     
    136130    } 
    137131 
    138  
    139  
    140  
    141132    void LisaaNappaimet() 
    142133    { 
     
    144135        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
    145136        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    146  
    147137        Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); 
    148138        Keyboard.Listen(Key.D, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 
    149139        Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 
    150140        Keyboard.Listen(Key.Enter, ButtonState.Down, AvaaKirjoitusIkkuna, "Avaa kirjoitusikkunan"); 
    151         Keyboard.Listen(Key.LeftControl, ButtonState.Pressed, AsetaHyppykerroin, "Korkeampi hyppy", 1.5); 
    152         Keyboard.Listen(Key.LeftControl, ButtonState.Released, AsetaHyppykerroin, null, 1.0); 
     141        Keyboard.Listen(Key.LeftShift, ButtonState.Pressed, AsetaHyppykerroin, "Korkeampi hyppy", 1.5); 
     142        Keyboard.Listen(Key.LeftShift, ButtonState.Released, AsetaHyppykerroin, null, 1.0); 
    153143        //Mouse.Listen(MouseButton.Left, ButtonState.Pressed, TarkistaHiirenPainallus, "Objektin kohdalla toiminto"); 
    154144        Keyboard.Listen(Key.F, ButtonState.Pressed, UlosAutosta, "Mene ulos autosta"); 
     
    202192    void LuoAuto(Vector paikka, double leveys, double korkeus) 
    203193    { 
    204         PhysicsObject auto1 = new PhysicsObject(auto1kuva); 
    205         auto1.Shape = Shape.FromImage(auto1kuva); 
    206         auto1.Position = paikka+ new Vector(0, 40); 
    207         auto1.Image = auto1kuva; 
     194        PhysicsObject auto1 = new PhysicsObject(auto12); 
     195        //auto1.Shape = Shape.FromImage(auto12); 
     196        auto1.Position = paikka + new Vector(0, 40); 
     197        auto1.Image = auto12; 
    208198        auto1.Tag = "auto"; 
    209199        auto1.Mass = 350; 
    210200        Add(auto1); 
    211201 
    212         Mouse.ListenOn(auto1, MouseButton.Left, ButtonState.Pressed, () => MeneAutoon(auto1),"Mene Autoon"); 
     202       
     203        Mouse.ListenOn(auto1, MouseButton.Left, ButtonState.Pressed, MeneAutoon, "Mene Autoon", auto1); 
    213204 
    214205    } 
     
    320311        { 
    321312            AddCollisionHandler(ammus, "auto", TuhoaAuto); 
     313            AddCollisionHandler(ammus, "tyyppi", TuhoaTyyppi); 
    322314            //ammus.Size *= 3; 
    323315            ammus.Image = panoksenkuba; 
     
    358350            rajahdyksenKohde.Destroy(); 
    359351            rajahdys.AddEffect(rajahdyksenKohde.X, rajahdyksenKohde.Y, 50); 
     352        } 
     353        if (rajahdyksenKohde.Tag.Equals("tyyppi")) 
     354        { 
     355            PhysicsObject a = new PhysicsObject(1, 1) 
     356                ; 
     357            PhysicsObject tyyppi = rajahdyksenKohde as PhysicsObject; 
     358            TuhoaTyyppi(a, tyyppi ); 
     359            rajahdyksenKohde.Destroy(); 
    360360        } 
    361361    } 
     
    377377 
    378378    } 
     379    void LuoTyyppi(Vector paikka, double leveys, double korkeus) 
     380    { 
     381        PhysicsObject tyyppi = new PhysicsObject(leveys, korkeus); 
     382        tyyppi.Position = paikka; 
     383        tyyppi.Mass = 50; 
     384        tyyppi.CanRotate = true; 
     385        tyyppi.Tag = "tyyppi"; 
     386        tyyppi.Image = tyyppikuva; 
     387        Add(tyyppi); 
     388    } 
     389    void TuhoaTyyppi(PhysicsObject ammus, PhysicsObject tyyppi) 
     390    { 
     391         
     392        Timer.SingleShot(10, delegate { LuoTyyppi(tyyppi.Position, tyyppi.Width, tyyppi.Height); }); 
     393        tyyppi.Destroy(); 
     394    } 
     395 
     396 
    379397} 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/bin/x86/Debug/Content/kentta1.txt

    r5977 r6015  
    22#..........................................................................................................................# 
    33#..........................................................................................................................# 
    4 #..........................................................................................................................# 
     4#.........T.......................................................T........................................................# 
    55#.......########..................###.........................########.....................................................# 
    66#..........................................................................................................................# 
     
    88#.....................................##########...............................#######.....................................# 
    99#.................##########.........................................................................#######...............# 
    10 #.....................................................###......N...........................................................# 
     10#.....................................................###......N.............................T.............................# 
    1111#.##############..........................................#######........................#########.........................# 
    1212#.....................................###########..........................................................................# 
     
    1414#..................................................................#####...................................................# 
    1515#..........................................................####...................................####..######.............# 
    16 #.............................########.....................................................................................# 
    17 #...........................................................##############......................#######....................# 
     16#.............................########..............................................................T......................# 
     17#...................T.......................................##############......................#######....................# 
    1818#................#######...................########...........................##########...................................# 
    1919#.......###................................................................................................................# 
    2020#..........................................................................................................................# 
    21 #..........................................................................................................................# 
     21#.......................................T................................................................T.................# 
    2222############################################################################################################################ 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r6009 r6015  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.xnb</Output> 
    11       <Time>0001-01-01T00:00:00</Time> 
     11      <Time>2015-06-11T10:30:29.0854056+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\maali.xnb</Output> 
    20       <Time>0001-01-01T00:00:00</Time> 
     20      <Time>2015-06-11T09:08:41.7062305+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2727      <Options>None</Options> 
    2828      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\norsu.xnb</Output> 
    29       <Time>0001-01-01T00:00:00</Time> 
     29      <Time>2015-06-11T11:30:55.3361577+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tahti.xnb</Output> 
    38       <Time>0001-01-01T00:00:00</Time> 
     38      <Time>2015-06-11T09:08:41.8310305+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4545      <Options>None</Options> 
    4646      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kaupunkitausta.xnb</Output> 
    47       <Time>0001-01-01T00:00:00</Time> 
     47      <Time>2015-06-11T09:08:41.9402305+03:00</Time> 
    4848    </Item> 
    49     <BuildSuccessful>false</BuildSuccessful> 
     49    <Item> 
     50      <Source>panos.png</Source> 
     51      <Name>panos</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\panos.xnb</Output> 
     56      <Time>2015-06-11T11:12:25.85705+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>liekki.png</Source> 
     60      <Name>liekki</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.xnb</Output> 
     65      <Time>2015-06-11T09:42:57.8290974+03:00</Time> 
     66    </Item> 
     67    <Item> 
     68      <Source>rajahdys_kuva.png</Source> 
     69      <Name>rajahdys_kuva</Name> 
     70      <Importer>TextureImporter</Importer> 
     71      <Processor>TextureProcessor</Processor> 
     72      <Options>None</Options> 
     73      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.xnb</Output> 
     74      <Time>2015-06-11T09:41:07.4100566+03:00</Time> 
     75    </Item> 
     76    <Item> 
     77      <Source>auto1.png</Source> 
     78      <Name>auto1</Name> 
     79      <Importer>TextureImporter</Importer> 
     80      <Processor>TextureProcessor</Processor> 
     81      <Options>None</Options> 
     82      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\auto1.xnb</Output> 
     83      <Time>2015-06-11T10:07:34.5537551+03:00</Time> 
     84    </Item> 
     85    <Item> 
     86      <Source>tyyppi.png</Source> 
     87      <Name>tyyppi</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90      <Options>None</Options> 
     91      <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tyyppi.xnb</Output> 
     92      <Time>2015-06-11T10:59:36.75505+03:00</Time> 
     93    </Item> 
     94    <BuildSuccessful>true</BuildSuccessful> 
    5095    <Settings> 
    5196      <ContentProjectGUID>{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}</ContentProjectGUID> 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/Grand Theft Norsu II.csproj.FileListAbsolute.txt

    r5987 r6015  
    3232C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.xnb 
    3333C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.xnb 
     34C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\panos.xnb 
     35C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.xnb 
     36C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.xnb 
     37C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\auto1.xnb 
     38C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\panos.png 
     39C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.png 
     40C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.png 
     41C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tyyppi.xnb 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r5987 r6015  
    44Content\tahti.xnb 
    55Content\kaupunkitausta.xnb 
    6 Content\auto1kuva.xnb 
    7 Content\kursori1.xnb 
    86Content\panos.xnb 
    97Content\liekki.xnb 
    108Content\rajahdys_kuva.xnb 
     9Content\auto1.xnb 
     10Content\tyyppi.xnb 
    1111Content\kentta1.txt 
     12Content\panos.png 
     13Content\liekki.png 
     14Content\rajahdys_kuva.png 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu IIContent/Grand Theft Norsu IIContent.contentproj

    r5987 r6015  
    7676  </ItemGroup> 
    7777  <ItemGroup> 
    78     <Compile Include="auto1kuva.png"> 
    79       <Name>auto1kuva</Name> 
    80       <Importer>TextureImporter</Importer> 
    81       <Processor>TextureProcessor</Processor> 
    82     </Compile> 
    83   </ItemGroup> 
    84   <ItemGroup> 
    85     <Compile Include="kursori1.png"> 
    86       <Name>kursori1</Name> 
    87       <Importer>TextureImporter</Importer> 
    88       <Processor>TextureProcessor</Processor> 
    89     </Compile> 
    90   </ItemGroup> 
    91   <ItemGroup> 
    9278    <Compile Include="panos.png"> 
    9379      <Name>panos</Name> 
    9480      <Importer>TextureImporter</Importer> 
    9581      <Processor>TextureProcessor</Processor> 
     82      <CopyToOutputDirectory>Always</CopyToOutputDirectory> 
    9683    </Compile> 
    9784  </ItemGroup> 
     
    10188      <Importer>TextureImporter</Importer> 
    10289      <Processor>TextureProcessor</Processor> 
     90      <CopyToOutputDirectory>Always</CopyToOutputDirectory> 
    10391    </Compile> 
    10492  </ItemGroup> 
     
    10694    <Compile Include="rajahdys_kuva.png"> 
    10795      <Name>rajahdys_kuva</Name> 
     96      <Importer>TextureImporter</Importer> 
     97      <Processor>TextureProcessor</Processor> 
     98      <CopyToOutputDirectory>Always</CopyToOutputDirectory> 
     99    </Compile> 
     100  </ItemGroup> 
     101  <ItemGroup> 
     102    <Compile Include="auto1.png"> 
     103      <Name>auto1</Name> 
     104      <Importer>TextureImporter</Importer> 
     105      <Processor>TextureProcessor</Processor> 
     106    </Compile> 
     107  </ItemGroup> 
     108  <ItemGroup> 
     109    <Compile Include="tyyppi.png"> 
     110      <Name>tyyppi</Name> 
    108111      <Importer>TextureImporter</Importer> 
    109112      <Processor>TextureProcessor</Processor> 
  • 2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu IIContent/kentta1.txt

    r5977 r6015  
    22#..........................................................................................................................# 
    33#..........................................................................................................................# 
    4 #..........................................................................................................................# 
     4#.........T.......................................................T........................................................# 
    55#.......########..................###.........................########.....................................................# 
    66#..........................................................................................................................# 
     
    88#.....................................##########...............................#######.....................................# 
    99#.................##########.........................................................................#######...............# 
    10 #.....................................................###......N...........................................................# 
     10#.....................................................###......N.............................T.............................# 
    1111#.##############..........................................#######........................#########.........................# 
    1212#.....................................###########..........................................................................# 
     
    1414#..................................................................#####...................................................# 
    1515#..........................................................####...................................####..######.............# 
    16 #.............................########.....................................................................................# 
    17 #...........................................................##############......................#######....................# 
     16#.............................########..............................................................T......................# 
     17#...................T.......................................##############......................#######....................# 
    1818#................#######...................########...........................##########...................................# 
    1919#.......###................................................................................................................# 
    2020#..........................................................................................................................# 
    21 #..........................................................................................................................# 
     21#.......................................T................................................................T.................# 
    2222############################################################################################################################ 
Note: See TracChangeset for help on using the changeset viewer.