Changeset 5419 for 2014/27/AnttoniS


Ignore:
Timestamp:
2014-07-04 11:24:22 (9 years ago)
Author:
ansevaki
Message:
 
Location:
2014/27/AnttoniS/weed hyppely
Files:
12 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppely/obj/x86/Debug/ContentPipeline-{6C1DBC56-3E69-434E-B42D-2200CB27D36F}.xml

    r5366 r5419  
    2727      <Options>None</Options> 
    2828      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\kentta1.xnb</Output> 
    29       <Time>2014-07-03T13:05:53.3475391+03:00</Time> 
     29      <Time>2014-07-04T11:04:33.0514955+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    218218      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\spiral2.xnb</Output> 
    219219      <Time>2014-07-03T13:56:25.5808486+03:00</Time> 
     220    </Item> 
     221    <Item> 
     222      <Source>weed12.png</Source> 
     223      <Name>weed12</Name> 
     224      <Importer>TextureImporter</Importer> 
     225      <Processor>TextureProcessor</Processor> 
     226      <Options>None</Options> 
     227      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\weed12.xnb</Output> 
     228      <Time>2014-07-04T09:12:21.6423579+03:00</Time> 
     229    </Item> 
     230    <Item> 
     231      <Source>kentta2.txt.txt</Source> 
     232      <Name>kentta2.txt</Name> 
     233      <Importer>TextFileImporter</Importer> 
     234      <Processor>TextFileContentProcessor</Processor> 
     235      <Options>None</Options> 
     236      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\kentta2.txt.xnb</Output> 
     237      <Time>2014-07-04T10:25:21.7573896+03:00</Time> 
     238    </Item> 
     239    <Item> 
     240      <Source>forest.jpg</Source> 
     241      <Name>forest</Name> 
     242      <Importer>TextureImporter</Importer> 
     243      <Processor>TextureProcessor</Processor> 
     244      <Options>None</Options> 
     245      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\forest.xnb</Output> 
     246      <Time>2014-07-04T10:48:15.8467848+03:00</Time> 
     247    </Item> 
     248    <Item> 
     249      <Source>tausta.jpg</Source> 
     250      <Name>tausta</Name> 
     251      <Importer>TextureImporter</Importer> 
     252      <Processor>TextureProcessor</Processor> 
     253      <Options>None</Options> 
     254      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\tausta.xnb</Output> 
     255      <Time>2014-07-04T10:58:02.0553998+03:00</Time> 
     256    </Item> 
     257    <Item> 
     258      <Source>maa.jpg</Source> 
     259      <Name>maa</Name> 
     260      <Importer>TextureImporter</Importer> 
     261      <Processor>TextureProcessor</Processor> 
     262      <Options>None</Options> 
     263      <Output>C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\maa.xnb</Output> 
     264      <Time>2014-07-04T10:59:29.5551489+03:00</Time> 
    220265    </Item> 
    221266    <BuildSuccessful>true</BuildSuccessful> 
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppely/obj/x86/Debug/cachefile-{6C1DBC56-3E69-434E-B42D-2200CB27D36F}-targetpath.txt

    r5366 r5419  
    2424Content\spiral.xnb 
    2525Content\spiral2.xnb 
     26Content\weed12.xnb 
     27Content\kentta2.txt.xnb 
     28Content\forest.xnb 
     29Content\tausta.xnb 
     30Content\maa.xnb 
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppely/obj/x86/Debug/weed hyppely.csproj.FileListAbsolute.txt

    r5366 r5419  
    3232C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\spiral.xnb 
    3333C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\spiral2.xnb 
     34C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\weed12.xnb 
     35C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\kentta2.txt.xnb 
     36C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\forest.xnb 
     37C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\tausta.xnb 
     38C:\MYTEMP\Anttoni S\weed hyppely\weed hyppely\weed hyppely\bin\x86\Debug\Content\maa.xnb 
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppely/weed hyppely.csproj.Debug.cachefile

    r5366 r5419  
    2323Content\spiral.xnb 
    2424Content\spiral2.xnb 
     25Content\weed12.xnb 
     26Content\kentta2.txt.xnb 
     27Content\forest.xnb 
     28Content\tausta.xnb 
     29Content\maa.xnb 
    2530Content\instrumental2.wma 
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppely/weed_hyppely.cs

    r5366 r5419  
    1212    int pelaajanTerveys = 5; 
    1313    const double nopeus = 200; 
     14    DoubleMeter voimaMittari; 
    1415    const double hyppyNopeus = 750; 
    1516    const int RUUDUN_KOKO = 40; 
     
    2223    //Image jaa = LoadImage("spiral"); 
    2324    Image tahtiKuva = LoadImage("bongo"); 
     25    Image maaKuva = LoadImage("maa"); 
    2426    Image rajahdysKuva = LoadImage("Smoke"); 
    2527    Image ammusKuva = LoadImage("jointti"); 
    2628    AssaultRifle doggase; 
    27  
    28     DoubleMeter voimaMittari; 
    29  
    30  
    3129    SoundEffect maaliAani = LoadSoundEffect("smokeweed"); 
     30    Image taustaKuva = LoadImage("tausta"); 
     31 
     32 
    3233 
    3334     
     
    4849        Camera.Follow(weed1); 
    4950        Camera.ZoomFactor = 1; 
     51        Level.Background.Image = taustaKuva; 
    5052        Camera.StayInLevel = true; 
    5153 
     
    5456        ajastin.Timeout += Ammu; 
    5557        ajastin.Start(); 
    56         pelaaja1Elama = new DoubleMeter(100); 
    57  
    58         voimaMittari = new DoubleMeter(10); 
    59         voimaMittari.MaxValue = 10; 
     58 
     59        voimaMittari = new DoubleMeter(5); 
     60        voimaMittari.MaxValue = 5; 
    6061        BarGauge voimaPalkki = new BarGauge(10, 150); 
    6162        voimaPalkki.BindTo(voimaMittari); 
     63        voimaMittari.LowerLimit += delegate { ses(voimaMittari.Value); }; 
    6264        Add(voimaPalkki); 
    6365 
     
    6769        voimaPalkki.BorderColor = Color.White; 
    6870        voimaPalkki.Angle = Angle.FromDegrees(90); 
     71 
     72        LuoPistelaskuri(); 
    6973    } 
    7074 
     
    7377        TileMap kentta = TileMap.FromLevelAsset("kentta1"); 
    7478        kentta.SetTileMethod('#', LisaaTaso); 
     79        kentta.SetTileMethod('M', LisaaMaali); 
    7580        kentta.SetTileMethod('*', LisaaTahti); 
    7681        kentta.SetTileMethod('N', LisaaPelaaja); 
     
    7883        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    7984        Level.CreateBorders(); 
    80         Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     85         
     86        //Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     87        Level.Background.CreateStars(10000); 
    8188    } 
    8289 
     
    8693        taso.Position = paikka; 
    8794        taso.Color = Color.Green; 
     95        taso.Image = maaKuva; 
    8896        Add(taso); 
    8997    } 
     98 
     99 
     100    void LisaaMaali(Vector paikka, double leveys, double korkeus) 
     101    { 
     102        PhysicsObject maali = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     103        maali.Position = paikka; 
     104        maali.Color = Color.Red; 
     105        Add(maali); 
     106        maali.Tag = "M"; 
     107    } 
     108 
     109 
     110 
    90111 
    91112    void LisaaTahti(Vector paikka, double leveys, double korkeus) 
     
    110131        AddCollisionHandler(weed1, "ammus", tormaanAmmus); 
    111132        AddCollisionHandler(weed1, "tahti", PelaajaParantuu); 
     133        AddCollisionHandler(weed1, "tahti", Pisteet); 
    112134        weed1.Animation = new Animation(ukkelinKavely); 
    113135        weed1.Animation.Start(); 
     
    154176        //maaliAani.Play(); 
    155177        MessageDisplay.Add("Blaze it!"); 
     178        MessageDisplay.Color = Color.Transparent; 
    156179        tahti.Destroy(); 
    157180        int pMaxMaara = 200; 
     
    182205        dogg.CanRotate = false; 
    183206        dogg.Add(doggase); 
    184         FollowerBrain seuraajanAivot = new FollowerBrain(weed1); 
    185         //dogg.Brain = seuraajanAivot; 
    186207        doggase.Angle += Angle.FromDegrees(180); 
    187208        doggase.IsVisible = false; 
    188         seuraajanAivot.Speed = 200; 
    189209    } 
    190210 
     
    192212    { 
    193213        ammus.Destroy(); 
    194         maaliAani.Play(); 
    195         ExplosionSystem rajahdys = 
    196         new ExplosionSystem(LoadImage("weed"), 1000); 
     214        //maaliAani.Play(); 
     215        ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("weed"), 1000); 
    197216        Add(rajahdys); 
    198217        double x = 0; 
     
    206225    { 
    207226        if (900 >= (doggase.Position - weed1.Position).Magnitude) 
     227         
    208228 
    209229        { 
     
    237257    { 
    238258        voimaMittari.Value--; 
     259 
    239260    } 
    240261 
     
    243264        voimaMittari.Value--; 
    244265 
    245         if (pelaajanTerveys >= 0) weed1.Destroy(); 
    246     } 
    247  
     266        if (pelaajanTerveys <= 0) weed1.Destroy(); 
     267 
     268    } 
     269 
     270    void ses(double mittarinArvo) 
     271    { 
     272        weed1.Destroy(); 
     273    } 
     274 
     275 
     276 
     277    IntMeter pisteLaskuri; 
     278    void LuoPistelaskuri() 
     279    { 
     280        pisteLaskuri = new IntMeter(0); 
     281 
     282        Label pisteNaytto = new Label(); 
     283        pisteNaytto.X = Screen.Left + 100; 
     284        pisteNaytto.Y = Screen.Top - 100; 
     285        pisteNaytto.TextColor = Color.Black; 
     286        pisteNaytto.Color = Color.Transparent; 
     287 
     288        pisteNaytto.BindTo(pisteLaskuri); 
     289        Add(pisteNaytto); 
     290        pisteNaytto.BindTo(pisteLaskuri); 
     291        Add(pisteNaytto); 
     292 
     293    } 
     294 
     295    void Pisteet(PhysicsObject hahmo, PhysicsObject tahti) 
     296    { 
     297        pisteLaskuri.Value++; 
     298    } 
    248299 
    249300} 
    250301 
     302 
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppelyContent/kentta1.txt

    r5366 r5419  
    66 
    77 
    8                 S 
    9         N *       *** 
     8                S              ###           
     9        N *                 ####*               
    1010################################################### 
  • 2014/27/AnttoniS/weed hyppely/weed hyppely/weed hyppelyContent/weed hyppelyContent.contentproj

    r5366 r5419  
    139139    </Compile> 
    140140  </ItemGroup> 
     141  <ItemGroup> 
     142    <Compile Include="weed12.png"> 
     143      <Name>weed12</Name> 
     144      <Importer>TextureImporter</Importer> 
     145      <Processor>TextureProcessor</Processor> 
     146    </Compile> 
     147  </ItemGroup> 
     148  <ItemGroup> 
     149    <Compile Include="kentta2.txt.txt"> 
     150      <Name>kentta2.txt</Name> 
     151      <Importer>TextFileImporter</Importer> 
     152      <Processor>TextFileContentProcessor</Processor> 
     153    </Compile> 
     154  </ItemGroup> 
     155  <ItemGroup> 
     156    <Compile Include="forest.jpg"> 
     157      <Name>forest</Name> 
     158      <Importer>TextureImporter</Importer> 
     159      <Processor>TextureProcessor</Processor> 
     160    </Compile> 
     161  </ItemGroup> 
     162  <ItemGroup> 
     163    <Compile Include="tausta.jpg"> 
     164      <Name>tausta</Name> 
     165      <Importer>TextureImporter</Importer> 
     166      <Processor>TextureProcessor</Processor> 
     167    </Compile> 
     168  </ItemGroup> 
     169  <ItemGroup> 
     170    <Compile Include="maa.jpg"> 
     171      <Name>maa</Name> 
     172      <Importer>TextureImporter</Importer> 
     173      <Processor>TextureProcessor</Processor> 
     174    </Compile> 
     175  </ItemGroup> 
    141176  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    142177  <!--  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.