Changeset 4244


Ignore:
Timestamp:
2013-06-26 14:56:33 (10 years ago)
Author:
roarolky
Message:

Talletus.

Location:
2013/26/RoopeK/Hypopolis/Hypopolis
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2013/26/RoopeK/Hypopolis/Hypopolis/Hypopolis/Hypopolis.cs

    r4231 r4244  
    1010{ 
    1111    Image pelihahmo = LoadImage("Pelihahmo2"); 
     12 
     13    Image taustakuva = LoadImage("Taustakuva"); 
     14    Image taustakuvareuna = LoadImage("TaustakuvaReuna"); 
     15    Image mustaruutu = LoadImage("Mustakuva"); 
     16 
    1217    PlatformCharacter2 pelaaja; 
     18 
     19    Label tekstikentta; 
    1320 
    1421    public override void Begin() 
    1522    { 
    1623 
    17       // Laskuri 
    18       Timer ajastin = new Timer(); 
    19       ajastin.Interval = 2.0; 
    20       ajastin.Timeout += LuoSatunnainenRakennus; 
    21       ajastin.Start(); 
    22   
     24        // Aloitus 
     25        MustaRuutu(); 
    2326 
    24         // Kamera 
    25         // Camera.ZoomToLevel(); 
     27        // Musiikki 
     28        MediaPlayer.Play("HypopolisTheme"); 
     29 
     30        // Laskuri 
     31        Timer ajastin = new Timer(); 
     32        ajastin.Interval = 2.0; 
     33        ajastin.Timeout += LuoSatunnainenRakennusVasemmalta; 
     34        ajastin.Start(); 
    2635 
    2736        // Pelaaja 
     
    3039        pelaaja.Color = Color.Black; 
    3140        pelaaja.X = 0; 
    32         pelaaja.Y = Level.Bottom + 1.0; 
     41        pelaaja.Y = Level.Bottom + 100.0; 
    3342        pelaaja.LinearDamping = 0.95; 
    3443        pelaaja.Restitution = 0.0; 
    35         pelaaja.Image = pelihahmo; 
     44        pelaaja.Image = mustaruutu; 
    3645        Gravity = new Vector(0, -2000); 
    3746        Add(pelaaja); 
     
    3948        // Aliohjelma 
    4049        Ohjaimet(); 
    41  
     50         
    4251        // Taso 
    4352        Surface vasenReuna = new Surface(500, 1200); 
    4453        vasenReuna.Restitution = 1.0; 
    4554        vasenReuna.X = -800; 
     55        vasenReuna.IsVisible = false; 
    4656        vasenReuna.Color = Color.White; 
    4757        Add(vasenReuna); 
     
    4959        Surface oikeaReuna = new Surface(500, 1200); 
    5060        oikeaReuna.Restitution = 1.0; 
    51         oikeaReuna.X = 800; 
     61        oikeaReuna.IsVisible = true; 
     62        oikeaReuna.X = 825; 
     63        oikeaReuna.Y = -1; 
    5264        oikeaReuna.Color = Color.White; 
    53         Add(oikeaReuna); 
     65        oikeaReuna.Image = mustaruutu; 
     66        Add(oikeaReuna, 2); 
    5467 
    5568        Surface yläReuna = new Surface(1400, 100); 
    5669        yläReuna.Restitution = 1.0; 
    5770        yläReuna.Y = 550; 
     71        yläReuna.IsVisible = false; 
    5872        yläReuna.Color = Color.White; 
    5973        Add(yläReuna); 
     
    6276        alaReuna.Restitution = 1.0; 
    6377        alaReuna.X = 0; 
    64         alaReuna.Y = -500; 
     78        alaReuna.Y = -515; 
     79        alaReuna.IsVisible = false; 
    6580        alaReuna.Color = Color.White; 
    6681        Add(alaReuna); 
    6782 
     83        Level.Background.Image = mustaruutu; 
    6884        Level.BackgroundColor = Color.Black; 
    6985 
     
    99115    } 
    100116 
    101     private void LuoSatunnainenRakennus() 
     117    private void LuoSatunnainenRakennusVasemmalta() 
    102118    { 
    103119 
    104120        double x = RandomGen.NextDouble(-1800, -1800); 
    105         double y = RandomGen.NextDouble(-400, 500); 
     121        double y = RandomGen.NextDouble(-370, 400); 
    106122        double r = RandomGen.NextDouble(500, 2000); 
    107123        double r2 = RandomGen.NextDouble(100, 200); 
     
    124140 
    125141    } 
     142 
     143    void MustaRuutu() 
     144    { 
     145 
     146        Label tekstikentta = new Label(2500, 2500, "Aloitus"); 
     147        tekstikentta.X = 0; 
     148        tekstikentta.Y = 0; 
     149        tekstikentta.TextColor = Color.White; 
     150        tekstikentta.Text = "Club Afterlife Presents_"; 
     151        Add(tekstikentta); 
     152        Timer ajastin = new Timer(); 
     153        ajastin.Interval = 5; 
     154        ajastin.Timeout += Aloitus; 
     155        ajastin.Start(1); 
     156         
     157    } 
     158 
     159    void Aloitus() 
     160    { 
     161 
     162        MessageDisplay.Clear(); 
     163        Timer ajastin = new Timer(); 
     164        ajastin.Interval = 2; 
     165        ajastin.Timeout += Aloitus1; 
     166        ajastin.Start(1); 
     167 
     168    } 
     169 
     170    void Aloitus1() 
     171    { 
     172 
     173        MessageDisplay.Clear(); 
     174        tekstikentta.Text = "Powered by XNA_"; 
     175 
     176    } 
    126177} 
  • 2013/26/RoopeK/Hypopolis/Hypopolis/HypopolisContent/HypopolisContent.contentproj

    r4231 r4244  
    5252    </Compile> 
    5353  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="HypopolisTheme.mp3"> 
     56      <Name>HypopolisTheme</Name> 
     57      <Importer>Mp3Importer</Importer> 
     58      <Processor>SongProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
     61  <ItemGroup> 
     62    <Compile Include="Taustakuva.png"> 
     63      <Name>Taustakuva</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
     66    </Compile> 
     67  </ItemGroup> 
     68  <ItemGroup> 
     69    <Compile Include="TaustakuvaReuna.png"> 
     70      <Name>TaustakuvaReuna</Name> 
     71      <Importer>TextureImporter</Importer> 
     72      <Processor>TextureProcessor</Processor> 
     73    </Compile> 
     74  </ItemGroup> 
     75  <ItemGroup> 
     76    <Compile Include="Mustakuva.png"> 
     77      <Name>Mustakuva</Name> 
     78      <Importer>TextureImporter</Importer> 
     79      <Processor>TextureProcessor</Processor> 
     80    </Compile> 
     81  </ItemGroup> 
    5482  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    5583  <!--  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.