Changeset 6783 for 2015/27


Ignore:
Timestamp:
2015-07-03 11:31:24 (8 years ago)
Author:
aaelruut
Message:
 
Location:
2015/27/AakeR/IMBT
Files:
8 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/AakeR/IMBT/IMBT/IMBT/IMBT.cs

    r6762 r6783  
    4848        ((IMBT)Game.Instance).AddCollisionHandler(this, "perusAmmus", delegate(PhysicsObject a, PhysicsObject b) 
    4949        { 
    50             this.healthit.Value -= 4; 
     50            this.healthit.Value -= 3; 
    5151            SavuLiekki(); 
    5252        }); 
     
    107107 
    108108            Flame liekki = new Flame(((IMBT)Game.Instance).liekkiKuva); 
     109            liekki.MinScale = 25.0; 
     110            liekki.MaxScale = 50.0; 
     111            liekki.ScaleAmount = 0.8; 
    109112            Game.Instance.Add(liekki); 
    110113            liekki.Position = this.Position; 
     
    147150    SoundEffect raketinAani = LoadSoundEffect("RakettiAani"); 
    148151    SoundEffect palloAani = LoadSoundEffect("PalloAani"); 
     152    SoundEffect boostiAani = LoadSoundEffect("BoostiAani"); 
    149153    Pelaaja pelaaja1; 
     154    MultiSelectWindow alkuValikko; 
     155    int pelaajienMaara = 2; 
    150156    double maxNopeus = 1000.0; 
    151157 
    152     //TODO Alkuvalikko 
    153     //TODO Boosti 
     158     
    154159 
    155160    public override void Begin() 
    156161    { 
    157         LuoKentta(); 
     162        Alkuvalikko(); 
     163        //LuoKentta(); 
    158164        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    159165        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    160     } 
     166     
     167    } 
     168 
     169    void Alkuvalikko() 
     170    { 
     171        alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 
     172        "Pelaa", "Lopeta"); 
     173        Add(alkuValikko); 
     174        alkuValikko.AddItemHandler(0, PelaajaMaara); 
     175        alkuValikko.AddItemHandler(1, Exit); 
     176 
     177 
     178    } 
     179 
     180    void PelaajaMaara() 
     181    { 
     182        alkuValikko.Destroy(); 
     183        alkuValikko = new MultiSelectWindow("Pelaajien määrä", "2 Pelaajaa", "3 Pelaajaa", "4 Pelaajaa"); 
     184        Add(alkuValikko); 
     185        alkuValikko.AddItemHandler(0, LuoKentta); 
     186        alkuValikko.AddItemHandler(1, delegate { pelaajienMaara = 3; LuoKentta(); }); 
     187        alkuValikko.AddItemHandler(2, delegate { pelaajienMaara = 4; LuoKentta(); }); 
     188    } 
     189 
    161190    void LuoKentta() 
    162191    { 
    163192 
    164         ColorTileMap ruudut = ColorTileMap.FromLevelAsset("kenttä1"); 
     193        alkuValikko.Destroy(); 
     194        string Kenttä = RandomGen.SelectOne<string>("Kenttä1", "Kenttä2", "Kenttä3", "Kenttä4"); 
     195        ColorTileMap ruudut = ColorTileMap.FromLevelAsset(Kenttä); 
    165196 
    166197 
    167198        ruudut.SetTileMethod(Color.FromHexCode("0026FF"), LuoPelaaja1); 
    168199        ruudut.SetTileMethod(Color.Cyan, LuoPelaaja2); 
    169         ruudut.SetTileMethod(Color.BrightGreen, LuoPelaaja3); 
    170         ruudut.SetTileMethod(Color.Rose, LuoPelaaja4); 
     200        if (pelaajienMaara >= 3) 
     201        { 
     202            ruudut.SetTileMethod(Color.BrightGreen, LuoPelaaja3); 
     203        } 
     204        if (pelaajienMaara == 4) 
     205        { 
     206            ruudut.SetTileMethod(Color.Rose, LuoPelaaja4); 
     207        } 
    171208        ruudut.SetTileMethod(Color.Black, LuoPalikka); 
    172209        Level.Background.Color = Color.Silver; 
    173210 
    174211        ruudut.Execute(80, 80); 
     212        Wind = new Vector(RandomGen.NextDouble(-50, 50), RandomGen.NextDouble(-50, 50)); 
    175213        Camera.ZoomToLevel(); 
    176214    } 
     
    345383        if (olio.Tag.Equals("pelaaja")) 
    346384        { 
    347             ((Pelaaja)olio).healthit.Value -= 12; 
     385            ((Pelaaja)olio).healthit.Value -= 14; 
    348386            ((Pelaaja)olio).SavuLiekki(); 
    349387        } 
     
    356394            pelaaja.boosti = false; 
    357395            pelaaja.Hit(pelaaja.Angle.GetVector() * 1000); 
    358             Timer.SingleShot(5, delegate 
     396            boostiAani.Play(); 
     397            Timer.SingleShot(4, delegate 
    359398            { 
    360399                pelaaja.boosti = true; 
  • 2015/27/AakeR/IMBT/IMBT/IMBT/IMBT.csproj.Debug.cachefile

    r6762 r6783  
    1010Content\Pelaaja3Kone1Tykki.xnb 
    1111Content\Pelaaja4Kone1Tykki.xnb 
     12Content\AmmusÄÀni.xnb 
    1213Content\Kone1PerusAmmus.xnb 
    13 Content\AmmusÄÀni.xnb 
    1414Content\KimpoilevaPallo.xnb 
    1515Content\Raketti.xnb 
     
    1919Content\RakettiAani.xnb 
    2020Content\PalloAani.xnb 
     21Content\BoostiAani.xnb 
     22Content\KenttÀ2.xnb 
     23Content\KenttÀ3.xnb 
     24Content\KenttÀ4.xnb 
  • 2015/27/AakeR/IMBT/IMBT/IMBT/obj/x86/Debug/IMBT.csproj.FileListAbsolute.txt

    r6762 r6783  
    2727C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\RakettiAani.xnb 
    2828C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\PalloAani.xnb 
     29C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\BoostiAani.xnb 
     30C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KenttÀ2.xnb 
     31C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KenttÀ3.xnb 
     32C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KenttÀ4.xnb 
  • 2015/27/AakeR/IMBT/IMBT/IMBT/obj/x86/Debug/cachefile-{B6A1F4C9-F2E2-4290-A5B5-3717058CC989}-targetpath.txt

    r6762 r6783  
    1010Content\Pelaaja3Kone1Tykki.xnb 
    1111Content\Pelaaja4Kone1Tykki.xnb 
     12Content\AmmusÄÀni.xnb 
    1213Content\Kone1PerusAmmus.xnb 
    13 Content\AmmusÄÀni.xnb 
    1414Content\KimpoilevaPallo.xnb 
    1515Content\Raketti.xnb 
     
    1919Content\RakettiAani.xnb 
    2020Content\PalloAani.xnb 
     21Content\BoostiAani.xnb 
     22Content\KenttÀ2.xnb 
     23Content\KenttÀ3.xnb 
     24Content\KenttÀ4.xnb 
  • 2015/27/AakeR/IMBT/IMBT/IMBTContent/IMBTContent.contentproj

    r6762 r6783  
    171171    </Compile> 
    172172  </ItemGroup> 
     173  <ItemGroup> 
     174    <Compile Include="BoostiAani.wav"> 
     175      <Name>BoostiAani</Name> 
     176      <Importer>WavImporter</Importer> 
     177      <Processor>SoundEffectProcessor</Processor> 
     178    </Compile> 
     179  </ItemGroup> 
     180  <ItemGroup> 
     181    <Compile Include="Kenttä2.png"> 
     182      <Name>Kenttä2</Name> 
     183      <Importer>TextureImporter</Importer> 
     184      <Processor>TextureProcessor</Processor> 
     185    </Compile> 
     186    <Compile Include="Kenttä3.png"> 
     187      <Name>Kenttä3</Name> 
     188      <Importer>TextureImporter</Importer> 
     189      <Processor>TextureProcessor</Processor> 
     190    </Compile> 
     191  </ItemGroup> 
     192  <ItemGroup> 
     193    <Compile Include="Kenttä4.png"> 
     194      <Name>Kenttä4</Name> 
     195      <Importer>TextureImporter</Importer> 
     196      <Processor>TextureProcessor</Processor> 
     197    </Compile> 
     198  </ItemGroup> 
    173199  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    174200  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/27/AakeR/IMBT/IMBT/IMBTContent/obj/x86/Debug/ContentPipeline.xml

    r6657 r6783  
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja1Kone1.xnb</Output> 
    20       <Time>2015-07-01T10:03:14.4004934+03:00</Time> 
     20      <Time>2015-07-03T09:18:32.4692936+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2727      <Options>None</Options> 
    2828      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja2Kone1.xnb</Output> 
    29       <Time>2015-07-01T10:03:14.4104934+03:00</Time> 
     29      <Time>2015-07-03T09:18:32.4792935+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja3Kone1.xnb</Output> 
    38       <Time>2015-07-01T10:03:14.4104934+03:00</Time> 
     38      <Time>2015-07-03T09:18:32.4792935+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4545      <Options>None</Options> 
    4646      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja4Kone1.xnb</Output> 
    47       <Time>2015-07-01T10:03:14.4204934+03:00</Time> 
     47      <Time>2015-07-03T09:18:32.4892934+03:00</Time> 
    4848    </Item> 
    4949    <Item> 
     
    5454      <Options>None</Options> 
    5555      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Palikka.xnb</Output> 
    56       <Time>2015-06-29T13:34:01.6885599+03:00</Time> 
     56      <Time>2015-07-03T09:18:32.4692936+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
     
    7272      <Options>None</Options> 
    7373      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja1Kone1Tykki.xnb</Output> 
    74       <Time>2015-07-01T10:03:14.4304934+03:00</Time> 
     74      <Time>2015-07-03T09:18:32.4892934+03:00</Time> 
    7575    </Item> 
    7676    <Item> 
     
    8181      <Options>None</Options> 
    8282      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja2Kone1Tykki.xnb</Output> 
    83       <Time>2015-07-01T10:03:14.4304934+03:00</Time> 
     83      <Time>2015-07-03T09:18:32.4992933+03:00</Time> 
    8484    </Item> 
    8585    <Item> 
     
    9090      <Options>None</Options> 
    9191      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja3Kone1Tykki.xnb</Output> 
    92       <Time>2015-07-01T10:03:14.4404934+03:00</Time> 
     92      <Time>2015-07-03T09:18:32.4992933+03:00</Time> 
    9393    </Item> 
    9494    <Item> 
     
    9999      <Options>None</Options> 
    100100      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja4Kone1Tykki.xnb</Output> 
    101       <Time>2015-07-01T10:03:14.4404934+03:00</Time> 
     101      <Time>2015-07-03T09:18:32.5092932+03:00</Time> 
    102102    </Item> 
    103103    <Item> 
     
    118118      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kone1PerusAmmus.xnb</Output> 
    119119      <Time>2015-07-01T10:03:14.4204934+03:00</Time> 
     120    </Item> 
     121    <Item> 
     122      <Source>KimpoilevaPallo.png</Source> 
     123      <Name>KimpoilevaPallo</Name> 
     124      <Importer>TextureImporter</Importer> 
     125      <Processor>TextureProcessor</Processor> 
     126      <Options>None</Options> 
     127      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KimpoilevaPallo.xnb</Output> 
     128      <Time>2015-07-03T09:18:32.4892934+03:00</Time> 
     129    </Item> 
     130    <Item> 
     131      <Source>Raketti.png</Source> 
     132      <Name>Raketti</Name> 
     133      <Importer>TextureImporter</Importer> 
     134      <Processor>TextureProcessor</Processor> 
     135      <Options>None</Options> 
     136      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Raketti.xnb</Output> 
     137      <Time>2015-07-03T09:18:32.4492938+03:00</Time> 
     138    </Item> 
     139    <Item> 
     140      <Source>RenkaidenJäljet.png</Source> 
     141      <Name>RenkaidenJäljet</Name> 
     142      <Importer>TextureImporter</Importer> 
     143      <Processor>TextureProcessor</Processor> 
     144      <Options>None</Options> 
     145      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\RenkaidenJäljet.xnb</Output> 
     146      <Time>2015-07-03T09:18:32.4392939+03:00</Time> 
     147    </Item> 
     148    <Item> 
     149      <Source>Rajahdys.png</Source> 
     150      <Name>Rajahdys</Name> 
     151      <Importer>TextureImporter</Importer> 
     152      <Processor>TextureProcessor</Processor> 
     153      <Options>None</Options> 
     154      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Rajahdys.xnb</Output> 
     155      <Time>2015-07-03T09:18:32.4592937+03:00</Time> 
     156    </Item> 
     157    <Item> 
     158      <Source>Liekki.png</Source> 
     159      <Name>Liekki</Name> 
     160      <Importer>TextureImporter</Importer> 
     161      <Processor>TextureProcessor</Processor> 
     162      <Options>None</Options> 
     163      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Liekki.xnb</Output> 
     164      <Time>2015-07-03T09:18:32.4592937+03:00</Time> 
     165    </Item> 
     166    <Item> 
     167      <Source>RakettiAani.wav</Source> 
     168      <Name>RakettiAani</Name> 
     169      <Importer>WavImporter</Importer> 
     170      <Processor>SoundEffectProcessor</Processor> 
     171      <Options>None</Options> 
     172      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\RakettiAani.xnb</Output> 
     173      <Time>2015-07-03T09:18:32.4492938+03:00</Time> 
     174    </Item> 
     175    <Item> 
     176      <Source>PalloAani.wav</Source> 
     177      <Name>PalloAani</Name> 
     178      <Importer>WavImporter</Importer> 
     179      <Processor>SoundEffectProcessor</Processor> 
     180      <Options>None</Options> 
     181      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\PalloAani.xnb</Output> 
     182      <Time>2015-07-03T09:18:32.4692936+03:00</Time> 
     183    </Item> 
     184    <Item> 
     185      <Source>BoostiAani.wav</Source> 
     186      <Name>BoostiAani</Name> 
     187      <Importer>WavImporter</Importer> 
     188      <Processor>SoundEffectProcessor</Processor> 
     189      <Options>None</Options> 
     190      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\BoostiAani.xnb</Output> 
     191      <Time>2015-07-03T11:01:08.3841777+03:00</Time> 
     192    </Item> 
     193    <Item> 
     194      <Source>Kenttä2.png</Source> 
     195      <Name>Kenttä2</Name> 
     196      <Importer>TextureImporter</Importer> 
     197      <Processor>TextureProcessor</Processor> 
     198      <Options>None</Options> 
     199      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kenttä2.xnb</Output> 
     200      <Time>2015-07-03T11:28:50.6449807+03:00</Time> 
     201    </Item> 
     202    <Item> 
     203      <Source>Kenttä3.png</Source> 
     204      <Name>Kenttä3</Name> 
     205      <Importer>TextureImporter</Importer> 
     206      <Processor>TextureProcessor</Processor> 
     207      <Options>None</Options> 
     208      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kenttä3.xnb</Output> 
     209      <Time>2015-07-03T11:16:08.2803777+03:00</Time> 
     210    </Item> 
     211    <Item> 
     212      <Source>Kenttä4.png</Source> 
     213      <Name>Kenttä4</Name> 
     214      <Importer>TextureImporter</Importer> 
     215      <Processor>TextureProcessor</Processor> 
     216      <Options>None</Options> 
     217      <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kenttä4.xnb</Output> 
     218      <Time>2015-07-03T11:29:47.2944632+03:00</Time> 
    120219    </Item> 
    121220    <BuildSuccessful>true</BuildSuccessful> 
Note: See TracChangeset for help on using the changeset viewer.