Changeset 9827 for 2017/30


Ignore:
Timestamp:
2018-08-01 11:40:13 (13 months ago)
Author:
lukrmoil
Message:
 
Location:
2017/30/HugoE/HanniAndHoo
Files:
4 added
4 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.cs

    r9825 r9827  
    1111    Image HanninKuva = LoadImage("Hanni"); 
    1212    Image HoonKuva = LoadImage("Hoo"); 
    13     Image taustis = LoadImage("sky1"); 
    14     Image taustis2 = LoadImage("Space"); 
    15  
    16        
     13    Image taustis = LoadImage("pihamaa"); 
     14    Image taustis2 = LoadImage("avaruus"); 
     15      
    1716    PlasmaCannon HanninAse; 
    1817    Cannon HoonAse; 
    1918 
     19    PhysicsObject AlaReuna; 
     20    PhysicsObject taso; 
     21 
    2022    SoundEffect hyppyAani = LoadSoundEffect("jump"); 
    2123 
    22      
    23  
    24     
     24   
    2525    PeliUkko Hanni; 
    2626    PeliUkko Hoo; 
     27 
    2728    public override void Begin() 
    2829    { 
    29         AlkuValikko(); 
    30         //IsFullScreen = true; 
    31          
    32  
     30        AlkuValikko();               
    3331    } 
    3432 
     
    10199        MediaPlayer.IsRepeating = true; 
    102100        MultiSelectWindow alkuValikko = new MultiSelectWindow("Hanni vs. Hoo", 
    103         "Aloita peli", "Lopeta");   
     101        "Valitse kenttä", "Lopeta");   
    104102        Level.Background.Color = Color.Black; 
    105103        Add(alkuValikko); 
    106         alkuValikko.AddItemHandler(0, AloitaPeli); 
     104        alkuValikko.AddItemHandler(0, Kenttävalikko); 
    107105        alkuValikko.AddItemHandler(1, Exit); 
    108106 
     
    113111        MediaPlayer.Stop(); 
    114112        MultiSelectWindow loppuValikko = new MultiSelectWindow("Hanni vs. Hoo", 
    115        "Pelaa uudestaan", "Lopeta"); 
     113        "Pelaa uudestaan", "Lopeta"); 
    116114        Level.Background.Color = Color.Black; 
    117115        Add(loppuValikko); 
    118         loppuValikko.AddItemHandler(0, AloitaPeli); 
     116        loppuValikko.AddItemHandler(0, Kenttävalikko); 
    119117        loppuValikko.AddItemHandler(1, Exit); 
    120118    } 
    121119 
    122     void AloitaPeli() 
     120 
     121     
     122    void Kenttävalikko() 
     123    { 
     124        MultiSelectWindow Kenttävalikko = new MultiSelectWindow("Kenttävalikko", "Pilvimaa", "Avaruus"); 
     125        Add(Kenttävalikko); 
     126        Kenttävalikko.AddItemHandler(0, Pihamaa); 
     127        Kenttävalikko.AddItemHandler(1, Avaruus);                 
     128    } 
     129 
     130    void Avaruus() 
    123131    { 
    124132        MediaPlayer.Stop(); 
    125133        ClearAll(); 
     134        PhysicsObject AlaReuna = PhysicsObject.CreateStaticObject(Screen.Width, 50); 
     135        AlaReuna.Y = Screen.Bottom + 50; 
     136        AlaReuna.Tag = "AlaReuna"; 
     137        AlaReuna.Color = Color.Black; 
     138        Add(AlaReuna); 
     139        Level.Background.Image = taustis2; 
    126140        LuoKentta(); 
    127141        LuoPelaajat(); 
    128142        LuoNappaimet(); 
    129          
    130     } 
    131  
    132  
     143        taso.Oscillate(new Vector(0, 18), 68, 0.20); 
     144    } 
     145 
     146    void Pihamaa() 
     147    { 
     148        MediaPlayer.Stop(); 
     149        ClearAll(); 
     150        PhysicsObject AlaReuna = PhysicsObject.CreateStaticObject(Screen.Width, 50); 
     151        AlaReuna.Y = Screen.Bottom + 50; 
     152        AlaReuna.Tag = "AlaReuna"; 
     153        AlaReuna.Color = Color.DarkBrown; 
     154        Add(AlaReuna); 
     155        Level.Background.Image = taustis; 
     156        LuoKentta(); 
     157        LuoPelaajat(); 
     158        LuoNappaimet(); 
     159           
     160    } 
     161 
     162     
    133163    void Tormaa(PhysicsObject Tormaaja, PhysicsObject Kohde) 
    134164    { 
    135         if (!Kohde.Tag.Equals("pelaaja")) return; 
    136         //Kohde.Hit(Tormaaja.Velocity * 25 + new Vector(0,100)); 
    137         //Kohde.Y += 100; 
    138         //Kohde.LinearDamping = 1; 
    139         //Kohde.Velocity = (Tormaaja.Velocity * 25 + new Vector(0, 100)); 
    140         //PeliUkko KohdeUkko = (PeliUkko)Kohde; 
    141         //KohdeUkko.ForceJump(1000); 
    142         //{ 
    143         //    if (Tormaaja.Y > Kohde.Y); 
    144         //} 
     165        if (!Kohde.Tag.Equals("pelaaja")) return;       
    145166        PeliUkko pu = (PeliUkko)Kohde; 
    146167        pu.Elamalaskuri.AddValue(-2); 
     
    201222    { 
    202223        Image Taso = LoadImage("platform"); 
    203         PhysicsObject taso = PhysicsObject.CreateStaticObject(275, 25); 
     224        PhysicsObject taso = PhysicsObject.CreateStaticObject(275, 20); 
    204225        taso.X = x; 
    205226        taso.Y = y; 
    206227        Add(taso); 
    207         taso.Oscillate(new Vector(0, 10), 50, 0.5); 
     228         
    208229        taso.Image = Taso; 
    209230        taso.Tag = "taso"; 
    210  
     231        //taso.CollisionIgnoreGroup = 7; 
    211232        taso.MakeOneWay(); 
    212  
    213233    } 
    214234    void LuoKentta() 
    215     { 
    216          
     235    {      
    217236        MediaPlayer.Stop(); 
    218237        MediaPlayer.Volume = 0.2; 
    219238        MediaPlayer.Play("TaistelumusaEhdokas2"); 
    220         MediaPlayer.IsRepeating = true; 
    221         Level.Background.Color = Color.Gray;         
     239        MediaPlayer.IsRepeating = true;         
    222240        Level.Width = Screen.Width; 
    223241        Level.Height = Screen.Height; 
    224         Level.Background.Image = taustis2; 
    225242        Level.Background.ScaleToLevelByWidth(); 
    226243        Gravity = new Vector(0.0, -1750.0);         
    227         PhysicsObject AlaReuna = Level.CreateBottomBorder(0.0, true); 
    228         AlaReuna.Y += 75; 
    229         AlaReuna.Tag = "AlaReuna"; 
    230         AlaReuna.Color = Color.Black; 
    231244        PhysicsObject OikeaReuna = Level.CreateRightBorder(1.0, true); 
    232245        OikeaReuna.Tag = "OikeaReuna"; 
     
    287300    void AmmuAseella(PlasmaCannon HanninAse) 
    288301    { 
    289         PhysicsObject Ammus = HanninAse.Shoot();         
     302        PhysicsObject Ammus = HanninAse.Shoot(); 
    290303        HanninAse.FireRate = 3; 
    291304        if (Ammus != null) 
     
    299312    void AmmuAseella2(Cannon HoonAse) 
    300313    { 
    301         PhysicsObject Ammus2 = HoonAse.Shoot(); 
     314        PhysicsObject Ammus2 = HoonAse.Shoot();        
    302315        HoonAse.FireRate = 2; 
    303316        if (Ammus2 != null) 
     317         
    304318        { 
    305319            Ammus2.Size *= 5; 
    306             Ammus2.MaximumLifetime = TimeSpan.FromSeconds(4.5); 
     320            Ammus2.MaximumLifetime = TimeSpan.FromSeconds(1.0); 
    307321            Ammus2.Tag = "Pelaajan2Ammus"; 
    308  
    309         } 
     322            //Ammus2.CollisionIgnoreGroup = 7; 
     323        }  
    310324 
    311325    } 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.csproj.Debug.cachefile

    r9824 r9827  
    22Content\Hoo.xnb 
    33Content\taustakuva.xnb 
    4 Content\sky1.xnb 
    5 Content\Space.xnb 
    64Content\TaistelumusaEhdokas2.xnb 
    75Content\taustamusiikki.xnb 
    86Content\jump.xnb 
    97Content\platform.xnb 
     8Content\pihamaa.xnb 
     9Content\avaruus.xnb 
    1010Content\TaistelumusaEhdokas2.wma 
    1111Content\taustamusiikki.wma 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/ContentPipeline-{C15B7F9E-AA60-42F1-A06A-82A8BC818B5D}.xml

    r9824 r9827  
    2828      <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\taustakuva.xnb</Output> 
    2929      <Time>2018-07-30T10:28:18.5139068+03:00</Time> 
    30     </Item> 
    31     <Item> 
    32       <Source>sky1.png</Source> 
    33       <Name>sky1</Name> 
    34       <Importer>TextureImporter</Importer> 
    35       <Processor>TextureProcessor</Processor> 
    36       <Options>None</Options> 
    37       <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\sky1.xnb</Output> 
    38       <Time>2018-07-30T10:28:18.5049051+03:00</Time> 
    39     </Item> 
    40     <Item> 
    41       <Source>Space.jpg</Source> 
    42       <Name>Space</Name> 
    43       <Importer>TextureImporter</Importer> 
    44       <Processor>TextureProcessor</Processor> 
    45       <Options>None</Options> 
    46       <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\Space.xnb</Output> 
    47       <Time>2018-07-30T10:28:18.335648+03:00</Time> 
    4830    </Item> 
    4931    <Item> 
     
    8466      <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\platform.xnb</Output> 
    8567      <Time>2018-07-31T10:06:55.3027816+03:00</Time> 
     68    </Item> 
     69    <Item> 
     70      <Source>pihamaa.png</Source> 
     71      <Name>pihamaa</Name> 
     72      <Importer>TextureImporter</Importer> 
     73      <Processor>TextureProcessor</Processor> 
     74      <Options>None</Options> 
     75      <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\pihamaa.xnb</Output> 
     76      <Time>2018-07-30T10:28:18.5049051+03:00</Time> 
     77    </Item> 
     78    <Item> 
     79      <Source>avaruus.jpg</Source> 
     80      <Name>avaruus</Name> 
     81      <Importer>TextureImporter</Importer> 
     82      <Processor>TextureProcessor</Processor> 
     83      <Options>None</Options> 
     84      <Output>C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\avaruus.xnb</Output> 
     85      <Time>2018-07-30T10:28:18.335648+03:00</Time> 
    8686    </Item> 
    8787    <BuildSuccessful>true</BuildSuccessful> 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/HanniAndHoo.csproj.FileListAbsolute.txt

    r9824 r9827  
    2020C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\Hoo.xnb 
    2121C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\taustakuva.xnb 
    22 C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\sky1.xnb 
    23 C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\Space.xnb 
    2422C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\TaistelumusaEhdokas2.xnb 
    2523C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\taustamusiikki.xnb 
     
    3735C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\obj\x86\Debug\HanniAndHoo.csproj.CoreCompileInputs.cache 
    3836C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\platform.xnb 
     37C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\pihamaa.xnb 
     38C:\MyTemp\lukrmoil\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\avaruus.xnb 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/cachefile-{C15B7F9E-AA60-42F1-A06A-82A8BC818B5D}-targetpath.txt

    r9824 r9827  
    22Content\Hoo.xnb 
    33Content\taustakuva.xnb 
    4 Content\sky1.xnb 
    5 Content\Space.xnb 
    64Content\TaistelumusaEhdokas2.xnb 
    75Content\TaistelumusaEhdokas2.wma 
     
    108Content\jump.xnb 
    119Content\platform.xnb 
     10Content\pihamaa.xnb 
     11Content\avaruus.xnb 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHooContent/HanniAndHooContent.contentproj

    r9824 r9827  
    7272  </ItemGroup> 
    7373  <ItemGroup> 
    74     <Compile Include="sky1.png"> 
    75       <Name>sky1</Name> 
     74    <Compile Include="pihamaa.png"> 
     75      <Name>pihamaa</Name> 
    7676      <Importer>TextureImporter</Importer> 
    7777      <Processor>TextureProcessor</Processor> 
     
    8686  </ItemGroup> 
    8787  <ItemGroup> 
    88     <Compile Include="Space.jpg"> 
    89       <Name>Space</Name> 
     88    <Compile Include="avaruus.jpg"> 
     89      <Name>avaruus</Name> 
    9090      <Importer>TextureImporter</Importer> 
    9191      <Processor>TextureProcessor</Processor> 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHooContent/obj/x86/Debug/HanniAndHooContent.contentproj.CoreCompileInputs.cache

    r9824 r9827  
    1 d38883debcf53222e9b9a4d86f6cdb74be1a0549 
     1078bf83f8daea05d5be6cd1cac4f2f6f56c86d05 
Note: See TracChangeset for help on using the changeset viewer.