- Timestamp:
- 2010-07-09 10:45:08 (13 years ago)
- Location:
- 2010/27/frjolehm/The King of the island/The King of the island
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/27/frjolehm/The King of the island/The King of the island/Content/Content.contentproj
r1190 r1213 98 98 </Compile> 99 99 </ItemGroup> 100 <ItemGroup> 101 <Compile Include="Kenttä3.png"> 102 <Name>Kenttä3</Name> 103 <Importer>TextureImporter</Importer> 104 <Processor>TextureProcessor</Processor> 105 </Compile> 106 </ItemGroup> 107 <ItemGroup> 108 <Compile Include="Kenttä4.png"> 109 <Name>Kenttä4</Name> 110 <Importer>TextureImporter</Importer> 111 <Processor>TextureProcessor</Processor> 112 </Compile> 113 </ItemGroup> 100 114 </Project> -
2010/27/frjolehm/The King of the island/The King of the island/Peli.cs
r1190 r1213 71 71 pelaaja1 = LuoUkko(Level.Left + 30,Level.Bottom + 75,85, 75,"Tipu1"); 72 72 pelaaja2 = LuoUkko(Level.Left+ 30,Level.Bottom + 200,85, 75,"Tipu2"); 73 74 73 LuoAikaLaskuri(); 75 74 } … … 78 77 79 78 Camera.Reset(); 79 80 Camera.Y = Level.Bottom + 250; 81 double ZoomKerroin = Screen.Height / 800; 82 Camera.Zoom(ZoomKerroin); //0.85 80 83 81 84 LuoKenttä(30000, 1000); … … 103 106 LuoKenttä(800, 700); 104 107 Camera.ZoomToLevel(); 108 Level.Background.Image = LoadImage("Kenttä3"); 105 109 Camera.Y = 0; 106 110 … … 108 112 109 113 pelaaja1 = LuoUkko(Level.Left + 100, Level.Bottom + 75, 85, 75, "Tipu1"); 110 pelaaja2 = LuoUkko(Level. Left + 30, Level.Bottom + 75, 85, 75, "Tipu2");114 pelaaja2 = LuoUkko(Level.Right - 100, Level.Bottom + 75, 85, 75, "Tipu2"); 111 115 112 116 Gravity = new Vector(0, -600); 113 117 AjastaPallot(Color.Blue); 114 118 LuoAikaLaskuri(); 115 119 } 116 120 else if (peliMuoto == 4) 121 { 122 Camera.Reset(); 123 124 LuoKenttä(800, 700); 125 Camera.ZoomToLevel(); 126 Level.Background.Image = LoadImage("Kenttä4"); 127 Camera.Y = 0; 128 129 LuoElämät(); 130 131 pelaaja1 = LuoUkko(Level.Left + 100, Level.Bottom + 75, 85, 75, "Tipu1"); 132 pelaaja2 = LuoUkko(Level.Right - 100, Level.Bottom + 75, 85, 75, "Tipu2"); 133 134 Gravity = new Vector(0, -700); 135 AjastaPallot(Color.Yellow); 136 LuoAikaLaskuri(); 137 } 138 139 } 140 141 void AjastaPallot(Color väri) 142 { 143 Timer palloAjastin = new Timer(); 144 palloAjastin.Interval = 5; 145 palloAjastin.Trigger += LuoPallo; 146 Add(palloAjastin); 147 palloAjastin.Tag = väri; 148 palloAjastin.Start(); 149 } 150 151 void LuoPallo(Timer sender) 152 { 153 PhysicsObject pallo = new PhysicsObject(20, 20, Shapes.Circle); 154 pallo.Color = (Color)sender.Tag; 155 pallo.Hit(new Vector(RandomGen.NextDouble(-100, 100), RandomGen.NextDouble(-200, -400))); 156 pallo.Y = Level.Top - 300; 157 AddCollisionHandler(pallo, Voitto); 158 pallo.Restitution = 1.0; 159 Add(pallo); 117 160 } 118 161 … … 295 338 LuoVoittaja(pelaaja1, pelaaja2); 296 339 } 297 else if (peliMuoto == 2 )340 else if (peliMuoto == 2 || peliMuoto == 3) 298 341 { 299 342 Pelaajan1joukkue--; … … 309 352 LuoVoittaja(pelaaja2, pelaaja1); 310 353 } 311 else if (peliMuoto == 2 )354 else if (peliMuoto == 2 || peliMuoto == 3) 312 355 { 313 356 Pelaajan2joukkue--;
Note: See TracChangeset
for help on using the changeset viewer.