Changeset 5624


Ignore:
Timestamp:
2014-07-24 11:21:46 (9 years ago)
Author:
lailrant
Message:
 
Location:
2014/30/LauriR/tesohyppelytestaus
Files:
3 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/ContentPipeline-{D6EAC6A9-8675-4ACB-8A67-C6CE954765FB}.xml

    r5591 r5624  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2014-07-23T14:30:13.3325482+03:00</Time> 
     38      <Time>2014-07-24T11:20:02.9261419+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    147147    </Item> 
    148148    <Item> 
    149       <Source>spikes.jpg</Source> 
     149      <Source>spikes.png</Source> 
    150150      <Name>spikes</Name> 
    151151      <Importer>TextureImporter</Importer> 
     
    153153      <Options>None</Options> 
    154154      <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\spikes.xnb</Output> 
    155       <Time>2014-07-23T14:24:28.1610345+03:00</Time> 
     155      <Time>2014-07-24T10:24:58.1196943+03:00</Time> 
     156    </Item> 
     157    <Item> 
     158      <Source>piikit2.jpg</Source> 
     159      <Name>piikit2</Name> 
     160      <Importer>TextureImporter</Importer> 
     161      <Processor>TextureProcessor</Processor> 
     162      <Options>None</Options> 
     163      <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\piikit2.xnb</Output> 
     164      <Time>2014-07-24T10:25:44.6853504+03:00</Time> 
    156165    </Item> 
    157166    <BuildSuccessful>true</BuildSuccessful> 
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/cachefile-{D6EAC6A9-8675-4ACB-8A67-C6CE954765FB}-targetpath.txt

    r5591 r5624  
    1616Content\sieni.xnb 
    1717Content\spikes.xnb 
     18Content\piikit2.xnb 
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/tesohyppelytestaus.csproj.FileListAbsolute.txt

    r5591 r5624  
    2424C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\sienii.xnb 
    2525C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\spikes.xnb 
     26C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\piikit2.xnb 
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus.cs

    r5591 r5624  
    99public class tesohyppelytestaus : PhysicsGame 
    1010{ 
     11 
    1112    const double nopeus = 200; 
    1213    const double hyppyNopeus = 750; 
     
    2021    Image Kissa = LoadImage("kissa"); 
    2122    Image Piikit = LoadImage("spikes"); 
     23    Image taustaKuva = LoadImage("doge"); 
     24    Image Piikit2 = LoadImage("piikit2"); 
    2225 
    2326    Image[] juoksukuvat = LoadImages("kuva7", "kuva6", "kuva5", "kuva4", "kuva3", "kuva2", "kuva1"); 
     
    2831    SoundEffect maaliAani = LoadSoundEffect("maali"); 
    2932 
     33 
    3034     
    3135 
    3236    public override void Begin() 
    3337    { 
     38        IsFullScreen = true; 
     39 
    3440        Gravity = new Vector(0, -1000); 
    3541 
     
    5157        kentta.SetTileMethod('K', LisaaKissa); 
    5258        kentta.SetTileMethod('P', LisaaPiikit); 
     59        kentta.SetTileMethod('V',LisaaPiikit2); 
    5360        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    5461        Level.CreateBorders(); 
    55         Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     62        Level.Background.Image = taustaKuva; 
     63        Level.Background.FitToLevel(); 
    5664    } 
    5765 
     
    6068        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    6169        taso.Position = paikka; 
    62         taso.Color = Color.ForestGreen; 
     70        taso.Color = Color.Black; 
    6371        Add(taso); 
    6472    } 
     
    95103    { 
    96104        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
    97         Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     105        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");                                                            
    98106 
    99107        Keyboard.Listen(Key.Left, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); 
     
    155163        kissa.Tag = "kissa"; 
    156164        Add(kissa); 
     165 
     166        
     167 
     168   
    157169    } 
    158170 
     
    160172    { 
    161173        maaliAani.Play(); 
    162         MessageDisplay.Add("oisuit kissaan"); 
     174        MessageDisplay.Add("oisuit kissaan hävisit pelin"); 
    163175        hahmo.Destroy(); 
    164176    } 
     
    182194    } 
    183195 
     196    void LisaaPiikit2(Vector paikka, double leveys, double korkeus) 
     197    { 
     198        PhysicsObject piikit2 = PhysicsObject.CreateStaticObject(leveys * 1.0, korkeus * 1.0); 
     199        piikit2.IgnoresCollisionResponse = true; 
     200        piikit2.Position = paikka; 
     201        piikit2.Image = Piikit2; 
     202        piikit2.Tag = "piikit2"; 
     203        Add(piikit2); 
     204    } 
     205 
     206    IntMeter pisteLaskuri; 
     207 
     208    void LuoPistelaskuri() 
     209    { 
     210        pisteLaskuri = new IntMeter(0); 
     211 
     212        Label pisteNaytto = new Label(); 
     213        pisteNaytto.X = Screen.Left + 100; 
     214        pisteNaytto.Y = Screen.Top - 100; 
     215        pisteNaytto.TextColor = Color.Black; 
     216        pisteNaytto.Color = Color.White; 
     217 
     218        pisteNaytto.BindTo(pisteLaskuri); 
     219        Add(pisteNaytto); 
     220    } 
     221 
     222 
    184223}  
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus.csproj.Debug.cachefile

    r5591 r5624  
    1616Content\sieni.xnb 
    1717Content\spikes.xnb 
     18Content\piikit2.xnb 
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestausContent/kentta1.txt

    r5591 r5624  
    1          * 
    2          ## 
     1        
     2            
     3            
     4            
     5            
     6                                     
     7                  ##    ##    ##    ##    ##    ##   ## 
     8                   
     9            N                  K 
     10            ##    ##    ##    ##    ##    ##    ##   ## 
    311 
    4        *    * 
    5        ##  ## 
    612 
    7      *        * 
    8      ##  ##  ## 
    9  
    10    *    *  *    *      
    11    ##  ##  ##  ## 
    12  
    13  *    *       *   * 
    14  ##  ##  ##  ##  ## ## ## ## ## ##### ##    #####  ##  ## # ##  
    15  
    16         N    S  K      PPPPPPPPPPPPPPPPPPPPPPP 
    17 ############################################################### 
     13P               #  PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP     
     14#     #########################################                        
     15       #                            # 
     16P               #  P#                            # 
     17#     ##                            #                          
     18       #                            # 
     19P               #  P#                            # 
     20#     ##                            # 
     21                     #                            # 
     22P               #  P#                            # 
     23#     ##                            # 
     24       #                            # 
     25P               #  P#                            # 
     26#     #    #                                                              # 
     27#*    *    #   *   *                # 
     28###  ##  ###                        #   
     29#          #                        # 
     30#      S   #                        # 
     31#####################################PPPPPPPPP        PPPPPPPPPP       PPPPPPPP 
  • 2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestausContent/tesohyppelytestausContent.contentproj

    r5591 r5624  
    154154  </ItemGroup> 
    155155  <ItemGroup> 
    156     <Compile Include="spikes.jpg"> 
     156    <Compile Include="spikes.png"> 
    157157      <Name>spikes</Name> 
     158      <Importer>TextureImporter</Importer> 
     159      <Processor>TextureProcessor</Processor> 
     160    </Compile> 
     161  </ItemGroup> 
     162  <ItemGroup> 
     163    <Compile Include="piikit2.jpg"> 
     164      <Name>piikit2</Name> 
    158165      <Importer>TextureImporter</Importer> 
    159166      <Processor>TextureProcessor</Processor> 
Note: See TracChangeset for help on using the changeset viewer.