Changeset 4244
- Timestamp:
- 2013-06-26 14:56:33 (10 years ago)
- 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 10 10 { 11 11 Image pelihahmo = LoadImage("Pelihahmo2"); 12 13 Image taustakuva = LoadImage("Taustakuva"); 14 Image taustakuvareuna = LoadImage("TaustakuvaReuna"); 15 Image mustaruutu = LoadImage("Mustakuva"); 16 12 17 PlatformCharacter2 pelaaja; 18 19 Label tekstikentta; 13 20 14 21 public override void Begin() 15 22 { 16 23 17 // Laskuri 18 Timer ajastin = new Timer(); 19 ajastin.Interval = 2.0; 20 ajastin.Timeout += LuoSatunnainenRakennus; 21 ajastin.Start(); 22 24 // Aloitus 25 MustaRuutu(); 23 26 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(); 26 35 27 36 // Pelaaja … … 30 39 pelaaja.Color = Color.Black; 31 40 pelaaja.X = 0; 32 pelaaja.Y = Level.Bottom + 1 .0;41 pelaaja.Y = Level.Bottom + 100.0; 33 42 pelaaja.LinearDamping = 0.95; 34 43 pelaaja.Restitution = 0.0; 35 pelaaja.Image = pelihahmo;44 pelaaja.Image = mustaruutu; 36 45 Gravity = new Vector(0, -2000); 37 46 Add(pelaaja); … … 39 48 // Aliohjelma 40 49 Ohjaimet(); 41 50 42 51 // Taso 43 52 Surface vasenReuna = new Surface(500, 1200); 44 53 vasenReuna.Restitution = 1.0; 45 54 vasenReuna.X = -800; 55 vasenReuna.IsVisible = false; 46 56 vasenReuna.Color = Color.White; 47 57 Add(vasenReuna); … … 49 59 Surface oikeaReuna = new Surface(500, 1200); 50 60 oikeaReuna.Restitution = 1.0; 51 oikeaReuna.X = 800; 61 oikeaReuna.IsVisible = true; 62 oikeaReuna.X = 825; 63 oikeaReuna.Y = -1; 52 64 oikeaReuna.Color = Color.White; 53 Add(oikeaReuna); 65 oikeaReuna.Image = mustaruutu; 66 Add(oikeaReuna, 2); 54 67 55 68 Surface yläReuna = new Surface(1400, 100); 56 69 yläReuna.Restitution = 1.0; 57 70 yläReuna.Y = 550; 71 yläReuna.IsVisible = false; 58 72 yläReuna.Color = Color.White; 59 73 Add(yläReuna); … … 62 76 alaReuna.Restitution = 1.0; 63 77 alaReuna.X = 0; 64 alaReuna.Y = -500; 78 alaReuna.Y = -515; 79 alaReuna.IsVisible = false; 65 80 alaReuna.Color = Color.White; 66 81 Add(alaReuna); 67 82 83 Level.Background.Image = mustaruutu; 68 84 Level.BackgroundColor = Color.Black; 69 85 … … 99 115 } 100 116 101 private void LuoSatunnainenRakennus ()117 private void LuoSatunnainenRakennusVasemmalta() 102 118 { 103 119 104 120 double x = RandomGen.NextDouble(-1800, -1800); 105 double y = RandomGen.NextDouble(- 400, 500);121 double y = RandomGen.NextDouble(-370, 400); 106 122 double r = RandomGen.NextDouble(500, 2000); 107 123 double r2 = RandomGen.NextDouble(100, 200); … … 124 140 125 141 } 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 } 126 177 } -
2013/26/RoopeK/Hypopolis/Hypopolis/HypopolisContent/HypopolisContent.contentproj
r4231 r4244 52 52 </Compile> 53 53 </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> 54 82 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 55 83 <!-- 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.