- Timestamp:
- 2012-07-26 14:56:08 (11 years ago)
- Location:
- 2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke
- Files:
-
- 49 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasuke.cs
r3746 r3767 25 25 Image pelaajanKuva2 = LoadImage("perusasento B"); 26 26 Image hyppykuvat2 = LoadImage("hyppy B"); 27 Image[] Rasengan = new Image[29]; // = LoadImages("rasengan1", "rasengan3", "rasengan2", "rasengan", "rasengan", ); 28 IntMeter P1elama = new IntMeter(50, 0, 50); 29 IntMeter P2elama = new IntMeter(50, 0, 50); 30 IntMeter P1energia = new IntMeter(0, 0, 5); 31 IntMeter P2energia = new IntMeter(0, 0, 5); 32 Image palloKuva = LoadImage("pallo"); 33 Image Ruumiskuva = LoadImage("kuolo"); 34 Image Ruumiskuva2 = LoadImage("kuolo B"); 35 27 36 public override void Begin() 28 37 { 38 for (int i = 1; i <= 29; i++) 39 { 40 Rasengan[i-1] = LoadImage("rasengan" + i); 41 } 42 43 AlkuValikko(); 44 } 45 46 void AlkuValikko() 47 { 48 ClearAll(); 49 MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 50 "Aloita peli", "Lopeta"); 51 alkuValikko.ItemSelected += PainettiinValikonNappia; 52 53 Add(alkuValikko); 54 } 55 56 void PainettiinValikonNappia(int valinta) 57 { 58 switch (valinta) 59 { 60 case 0: 61 AloitaPeli(); 62 break; 63 case 1: 64 Exit(); 65 break; 66 } 67 } 68 69 void AloitaPeli() 70 { 71 ClearAll(); 29 72 Gravity = new Vector(0, -1000); 30 73 31 74 LuoKentta(); 75 LuoElamaLaskurit(); 32 76 LisaaNappaimet(); 77 78 P1elama.Value = 50; 79 P2elama.Value = 50; 80 P1energia.Value = 0; 81 P2energia.Value = 0; 82 83 Timer ajastin = new Timer(); 84 ajastin.Interval = 3; 85 ajastin.Timeout += LuoPallo; 86 ajastin.Start(); 33 87 34 88 // Camera.Follow(pelaaja1); 35 89 Camera.ZoomToLevel(); 36 90 //Camera.StayInLevel = true; 91 92 MediaPlayer.Play("Fight Music 1"); 93 MediaPlayer.IsRepeating = true; 94 } 95 96 void LuoPallo() 97 { 98 PhysicsObject Pallo = new PhysicsObject(30, 30, Shape.Circle); 99 Pallo.X = RandomGen.NextDouble(Level.Left, Level.Right); 100 Pallo.Y = RandomGen.NextDouble(Level.Bottom, Level.Top); 101 Pallo.Image = palloKuva; 102 Pallo.Tag = "pallo"; 103 Add(Pallo); 104 105 Timer ajastin = new Timer(); 106 ajastin.Interval = 5; 107 ajastin.Timeout += delegate { Pallo.Destroy(); }; 108 ajastin.Start(); 109 } 110 111 void LuoElamaLaskurit() 112 { 113 //elamaLaskuri = new Meter(10); 114 //elamaLaskuri.LowerLimit += ElamaLoppui; 115 116 ProgressBar elamaPalkki = new ProgressBar(150, 20); 117 elamaPalkki.BarColor = Color.Green; 118 elamaPalkki.X = Screen.Left + 230; 119 elamaPalkki.Y = Screen.Top - 60; 120 elamaPalkki.Width = 400; 121 elamaPalkki.BindTo(P1elama); 122 Add(elamaPalkki); 123 124 ProgressBar energiaPalkki = new ProgressBar(150, 20); 125 energiaPalkki.BarColor = Color.Blue; 126 energiaPalkki.X = Screen.Left + 230; 127 energiaPalkki.Y = Screen.Top - 100; 128 energiaPalkki.Width = 400; 129 energiaPalkki.BindTo(P1energia); 130 Add(energiaPalkki); 131 132 133 ProgressBar elamaPalkki2 = new ProgressBar(150, 20); 134 elamaPalkki2.BarColor = Color.Green; 135 elamaPalkki2.X = Screen.Right - 230; 136 elamaPalkki2.Y = Screen.Top - 60; 137 elamaPalkki2.Width = 400; 138 elamaPalkki2.BindTo(P2elama); 139 Add(elamaPalkki2); 140 141 ProgressBar energiaPalkki2 = new ProgressBar(150, 20); 142 energiaPalkki2.BarColor = Color.Blue; 143 energiaPalkki2.X = Screen.Right - 230; 144 energiaPalkki2.Y = Screen.Top - 100; 145 energiaPalkki2.Width = 400; 146 energiaPalkki2.BindTo(P2energia); 147 Add(energiaPalkki2); 37 148 } 38 149 … … 73 184 pelaaja1.AnimIdle = new Animation(pelaajanKuva); 74 185 pelaaja1.AnimJump = new Animation(Hyppykuvat) ; 75 186 AddCollisionHandler(pelaaja1, "pallo", KeraaPallo); 187 } 188 189 void KeraaPallo(PhysicsObject pelaaja, PhysicsObject pallo) 190 { 191 if (pelaaja == pelaaja1) P1energia.Value++; 192 if (pelaaja == pelaaja2) P2energia.Value++; 193 pallo.Destroy(); 76 194 } 77 195 … … 88 206 pelaaja2.AnimIdle = new Animation(pelaajanKuva2); 89 207 pelaaja2.AnimJump = new Animation(hyppykuvat2); 90 208 AddCollisionHandler(pelaaja2, "pallo", KeraaPallo); 91 209 } 92 210 void LisaaNappaimet() … … 106 224 ControllerOne.Listen(Button.B, ButtonState.Pressed, Isku, "lyo vastustajaa", pelaaja1); 107 225 ControllerOne.ListenAnalog(AnalogControl.LeftStick, 0.1, LiikutaTatilla, "Liikuta pelaajaa tattia pyörittämällä.", pelaaja1, nopeus); 108 226 ControllerOne.Listen(Button.Y, ButtonState.Pressed, SuperIsku, "Tee superliike (kun mittari on täynnä)", pelaaja1); 109 227 ControllerTwo.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja2, hyppyNopeus); 110 228 ControllerTwo.Listen(Button.B, ButtonState.Pressed, Isku, "lyo vastustajaa", pelaaja2); … … 114 232 void Isku(PlatformCharacter pelaaja) 115 233 { 116 Animation iskuanimaatio = new Animation(Pelaaja1combo); 117 iskuanimaatio.FPS = 4; 234 Animation iskuanimaatio; 235 236 PlatformCharacter vastustaja; 237 238 if (pelaaja == pelaaja1) 239 { 240 iskuanimaatio = new Animation(Pelaaja1combo); 241 vastustaja = pelaaja2; 242 } 243 else 244 { 245 iskuanimaatio = new Animation(Pelaaja2combo); 246 vastustaja = pelaaja1; 247 } 248 iskuanimaatio.FPS = 6; 118 249 pelaaja.PlayAnimation(iskuanimaatio); 250 251 PhysicsObject alue; 252 alue = new PhysicsObject(15, 15); 253 alue.Position = pelaaja.Position+pelaaja.FacingDirection.GetVector()*50; 254 Add(alue); 255 alue.IgnoresCollisionResponse = true; 256 alue.IgnoresGravity = true; 257 Timer ajastin = new Timer(); 258 ajastin.Interval=0.2; 259 ajastin.Timeout += delegate { alue.Destroy(); }; 260 ajastin.Start(); 261 262 alue.Collided += delegate { iskuosuu(vastustaja,1); alue.Destroy(); }; 263 264 } 265 266 267 void iskuosuu(PlatformCharacter pelaaja, int vahinko) 268 { 269 if (pelaaja == pelaaja1) 270 { 271 P1elama.Value -= vahinko; 272 if (P1elama.Value <= 0) 273 { 274 PhysicsObject ruumis = new PhysicsObject(Ruumiskuva); 275 ruumis.Position = pelaaja1.Position; 276 Add(ruumis); 277 pelaaja1.Position = new Vector(-1000,0); 278 pelaaja1.Destroy(); 279 } 280 } 281 else 282 { 283 P2elama.Value -= vahinko; 284 if (P2elama.Value <= 0) 285 { 286 PhysicsObject ruumis = new PhysicsObject(Ruumiskuva2); 287 ruumis.Position = pelaaja2.Position; 288 Add(ruumis); 289 pelaaja2.Position = new Vector(-1000, 0); 290 pelaaja2.Destroy(); 291 } 292 } 293 294 if (P1elama.Value <= 0 || P2elama.Value <= 0) 295 { 296 Timer ajastin = new Timer(); 297 298 ajastin.Interval = 3; 299 ajastin.Timeout += delegate { AlkuValikko(); }; 300 ajastin.Start(); 301 } 302 } 303 304 void SuperIsku(PlatformCharacter pelaaja) 305 { 306 307 Animation iskuanimaatio; 308 PlatformCharacter vastustaja; 309 310 if (pelaaja == pelaaja1) 311 { 312 if (P1energia.Value != 5) return; 313 P1energia.Value = 0; 314 iskuanimaatio = new Animation(Rasengan); 315 vastustaja = pelaaja2; 316 } 317 else 318 { 319 if (P2energia.Value != 5) return; 320 P2energia.Value = 0; 321 iskuanimaatio = new Animation(Pelaaja2combo); 322 vastustaja = pelaaja1; 323 } 324 325 pelaaja.Width *= 2; 326 pelaaja.Height *= 1.5; 327 328 iskuanimaatio.FPS = 6; 329 pelaaja.PlayAnimation(iskuanimaatio); 330 iskuanimaatio.Played += delegate { pelaaja.Width = RUUDUN_KOKO; pelaaja.Height = RUUDUN_KOKO; }; 331 332 PhysicsObject alue; 333 alue = new PhysicsObject(40, 40); 334 alue.Position = pelaaja.Position + pelaaja.FacingDirection.GetVector() * 50; 335 Add(alue); 336 alue.IgnoresCollisionResponse = true; 337 alue.IgnoresGravity = true; 338 Timer ajastin = new Timer(); 339 ajastin.Interval = 0.2; 340 ajastin.Timeout += delegate { alue.Destroy(); }; 341 ajastin.Start(); 342 343 alue.Collided += delegate { iskuosuu(vastustaja,5); alue.Destroy(); }; 344 119 345 } 120 346 -
2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasukeContent/NarutoVSsasukeContent.contentproj
r3746 r3767 99 99 <Processor>TextureProcessor</Processor> 100 100 </Compile> 101 <Compile Include="rasengan 1.png"> 102 <Name>rasengan 1</Name> 101 <Compile Include="suojaus.png"> 102 <Name>suojaus</Name> 103 <Importer>TextureImporter</Importer> 104 <Processor>TextureProcessor</Processor> 105 </Compile> 106 </ItemGroup> 107 <ItemGroup> 108 <Compile Include="juoksu2.png"> 109 <Name>juoksu2</Name> 110 <Importer>TextureImporter</Importer> 111 <Processor>TextureProcessor</Processor> 112 </Compile> 113 </ItemGroup> 114 <ItemGroup> 115 <Compile Include="tausta.png"> 116 <Name>tausta</Name> 117 <Importer>TextureImporter</Importer> 118 <Processor>TextureProcessor</Processor> 119 </Compile> 120 </ItemGroup> 121 <ItemGroup> 122 <Compile Include="combo 1 B %281%29.png"> 123 <Name>combo 1 B %281%29</Name> 124 <Importer>TextureImporter</Importer> 125 <Processor>TextureProcessor</Processor> 126 </Compile> 127 <Compile Include="combo 1 B %2812%29.png"> 128 <Name>combo 1 B %2812%29</Name> 129 <Importer>TextureImporter</Importer> 130 <Processor>TextureProcessor</Processor> 131 </Compile> 132 <Compile Include="combo 1 B %282%29.png"> 133 <Name>combo 1 B %282%29</Name> 134 <Importer>TextureImporter</Importer> 135 <Processor>TextureProcessor</Processor> 136 </Compile> 137 <Compile Include="combo 1 B %283%29.png"> 138 <Name>combo 1 B %283%29</Name> 139 <Importer>TextureImporter</Importer> 140 <Processor>TextureProcessor</Processor> 141 </Compile> 142 <Compile Include="combo 1 B %284%29.png"> 143 <Name>combo 1 B %284%29</Name> 144 <Importer>TextureImporter</Importer> 145 <Processor>TextureProcessor</Processor> 146 </Compile> 147 <Compile Include="hyppy B 2.png"> 148 <Name>hyppy B 2</Name> 149 <Importer>TextureImporter</Importer> 150 <Processor>TextureProcessor</Processor> 151 </Compile> 152 <Compile Include="hyppy B.png"> 153 <Name>hyppy B</Name> 154 <Importer>TextureImporter</Importer> 155 <Processor>TextureProcessor</Processor> 156 </Compile> 157 <Compile Include="Juoksu B 2.png"> 158 <Name>Juoksu B 2</Name> 159 <Importer>TextureImporter</Importer> 160 <Processor>TextureProcessor</Processor> 161 </Compile> 162 <Compile Include="Juoksu B.png"> 163 <Name>Juoksu B</Name> 164 <Importer>TextureImporter</Importer> 165 <Processor>TextureProcessor</Processor> 166 </Compile> 167 <Compile Include="kuolo B.png"> 168 <Name>kuolo B</Name> 169 <Importer>TextureImporter</Importer> 170 <Processor>TextureProcessor</Processor> 171 </Compile> 172 <Compile Include="pieni vahinko B.png"> 173 <Name>pieni vahinko B</Name> 174 <Importer>TextureImporter</Importer> 175 <Processor>TextureProcessor</Processor> 176 </Compile> 177 </ItemGroup> 178 <ItemGroup> 179 <Compile Include="perusasento B.png"> 180 <Name>perusasento B</Name> 181 <Importer>TextureImporter</Importer> 182 <Processor>TextureProcessor</Processor> 183 </Compile> 184 </ItemGroup> 185 <ItemGroup> 186 <Compile Include="combo 1.png"> 187 <Name>combo 1</Name> 188 <Importer>TextureImporter</Importer> 189 <Processor>TextureProcessor</Processor> 190 </Compile> 191 <Compile Include="combo 2.png"> 192 <Name>combo 2</Name> 193 <Importer>TextureImporter</Importer> 194 <Processor>TextureProcessor</Processor> 195 </Compile> 196 <Compile Include="combo 3.png"> 197 <Name>combo 3</Name> 198 <Importer>TextureImporter</Importer> 199 <Processor>TextureProcessor</Processor> 200 </Compile> 201 </ItemGroup> 202 <ItemGroup> 203 <Compile Include="rasengan1.png"> 204 <Name>rasengan1</Name> 205 <Importer>TextureImporter</Importer> 206 <Processor>TextureProcessor</Processor> 207 </Compile> 208 <Compile Include="rasengan10.png"> 209 <Name>rasengan10</Name> 210 <Importer>TextureImporter</Importer> 211 <Processor>TextureProcessor</Processor> 212 </Compile> 213 <Compile Include="rasengan11.png"> 214 <Name>rasengan11</Name> 215 <Importer>TextureImporter</Importer> 216 <Processor>TextureProcessor</Processor> 217 </Compile> 218 <Compile Include="rasengan12.png"> 219 <Name>rasengan12</Name> 220 <Importer>TextureImporter</Importer> 221 <Processor>TextureProcessor</Processor> 222 </Compile> 223 <Compile Include="rasengan13.png"> 224 <Name>rasengan13</Name> 225 <Importer>TextureImporter</Importer> 226 <Processor>TextureProcessor</Processor> 227 </Compile> 228 <Compile Include="rasengan14.png"> 229 <Name>rasengan14</Name> 230 <Importer>TextureImporter</Importer> 231 <Processor>TextureProcessor</Processor> 232 </Compile> 233 <Compile Include="rasengan15.png"> 234 <Name>rasengan15</Name> 235 <Importer>TextureImporter</Importer> 236 <Processor>TextureProcessor</Processor> 237 </Compile> 238 <Compile Include="rasengan16.png"> 239 <Name>rasengan16</Name> 240 <Importer>TextureImporter</Importer> 241 <Processor>TextureProcessor</Processor> 242 </Compile> 243 <Compile Include="rasengan17.png"> 244 <Name>rasengan17</Name> 245 <Importer>TextureImporter</Importer> 246 <Processor>TextureProcessor</Processor> 247 </Compile> 248 <Compile Include="rasengan18.png"> 249 <Name>rasengan18</Name> 250 <Importer>TextureImporter</Importer> 251 <Processor>TextureProcessor</Processor> 252 </Compile> 253 <Compile Include="rasengan19.png"> 254 <Name>rasengan19</Name> 103 255 <Importer>TextureImporter</Importer> 104 256 <Processor>TextureProcessor</Processor> … … 109 261 <Processor>TextureProcessor</Processor> 110 262 </Compile> 263 <Compile Include="rasengan20.png"> 264 <Name>rasengan20</Name> 265 <Importer>TextureImporter</Importer> 266 <Processor>TextureProcessor</Processor> 267 </Compile> 268 <Compile Include="rasengan21.png"> 269 <Name>rasengan21</Name> 270 <Importer>TextureImporter</Importer> 271 <Processor>TextureProcessor</Processor> 272 </Compile> 273 <Compile Include="rasengan22.png"> 274 <Name>rasengan22</Name> 275 <Importer>TextureImporter</Importer> 276 <Processor>TextureProcessor</Processor> 277 </Compile> 278 <Compile Include="rasengan23.png"> 279 <Name>rasengan23</Name> 280 <Importer>TextureImporter</Importer> 281 <Processor>TextureProcessor</Processor> 282 </Compile> 283 <Compile Include="rasengan24.png"> 284 <Name>rasengan24</Name> 285 <Importer>TextureImporter</Importer> 286 <Processor>TextureProcessor</Processor> 287 </Compile> 288 <Compile Include="rasengan25.png"> 289 <Name>rasengan25</Name> 290 <Importer>TextureImporter</Importer> 291 <Processor>TextureProcessor</Processor> 292 </Compile> 293 <Compile Include="rasengan26.png"> 294 <Name>rasengan26</Name> 295 <Importer>TextureImporter</Importer> 296 <Processor>TextureProcessor</Processor> 297 </Compile> 298 <Compile Include="rasengan27.png"> 299 <Name>rasengan27</Name> 300 <Importer>TextureImporter</Importer> 301 <Processor>TextureProcessor</Processor> 302 </Compile> 303 <Compile Include="rasengan28.png"> 304 <Name>rasengan28</Name> 305 <Importer>TextureImporter</Importer> 306 <Processor>TextureProcessor</Processor> 307 </Compile> 308 <Compile Include="rasengan29.png"> 309 <Name>rasengan29</Name> 310 <Importer>TextureImporter</Importer> 311 <Processor>TextureProcessor</Processor> 312 </Compile> 111 313 <Compile Include="rasengan3.png"> 112 314 <Name>rasengan3</Name> … … 129 331 <Processor>TextureProcessor</Processor> 130 332 </Compile> 131 <Compile Include="suojaus.png"> 132 <Name>suojaus</Name> 133 <Importer>TextureImporter</Importer> 134 <Processor>TextureProcessor</Processor> 135 </Compile> 136 </ItemGroup> 137 <ItemGroup> 138 <Compile Include="juoksu2.png"> 139 <Name>juoksu2</Name> 140 <Importer>TextureImporter</Importer> 141 <Processor>TextureProcessor</Processor> 142 </Compile> 143 </ItemGroup> 144 <ItemGroup> 145 <Compile Include="tausta.png"> 146 <Name>tausta</Name> 147 <Importer>TextureImporter</Importer> 148 <Processor>TextureProcessor</Processor> 149 </Compile> 150 </ItemGroup> 151 <ItemGroup> 152 <Compile Include="combo 1 B %281%29.png"> 153 <Name>combo 1 B %281%29</Name> 154 <Importer>TextureImporter</Importer> 155 <Processor>TextureProcessor</Processor> 156 </Compile> 157 <Compile Include="combo 1 B %2812%29.png"> 158 <Name>combo 1 B %2812%29</Name> 159 <Importer>TextureImporter</Importer> 160 <Processor>TextureProcessor</Processor> 161 </Compile> 162 <Compile Include="combo 1 B %282%29.png"> 163 <Name>combo 1 B %282%29</Name> 164 <Importer>TextureImporter</Importer> 165 <Processor>TextureProcessor</Processor> 166 </Compile> 167 <Compile Include="combo 1 B %283%29.png"> 168 <Name>combo 1 B %283%29</Name> 169 <Importer>TextureImporter</Importer> 170 <Processor>TextureProcessor</Processor> 171 </Compile> 172 <Compile Include="combo 1 B %284%29.png"> 173 <Name>combo 1 B %284%29</Name> 174 <Importer>TextureImporter</Importer> 175 <Processor>TextureProcessor</Processor> 176 </Compile> 177 <Compile Include="hyppy B 2.png"> 178 <Name>hyppy B 2</Name> 179 <Importer>TextureImporter</Importer> 180 <Processor>TextureProcessor</Processor> 181 </Compile> 182 <Compile Include="hyppy B.png"> 183 <Name>hyppy B</Name> 184 <Importer>TextureImporter</Importer> 185 <Processor>TextureProcessor</Processor> 186 </Compile> 187 <Compile Include="Juoksu B 2.png"> 188 <Name>Juoksu B 2</Name> 189 <Importer>TextureImporter</Importer> 190 <Processor>TextureProcessor</Processor> 191 </Compile> 192 <Compile Include="Juoksu B.png"> 193 <Name>Juoksu B</Name> 194 <Importer>TextureImporter</Importer> 195 <Processor>TextureProcessor</Processor> 196 </Compile> 197 <Compile Include="kuolo B.png"> 198 <Name>kuolo B</Name> 199 <Importer>TextureImporter</Importer> 200 <Processor>TextureProcessor</Processor> 201 </Compile> 202 <Compile Include="pieni vahinko B.png"> 203 <Name>pieni vahinko B</Name> 204 <Importer>TextureImporter</Importer> 205 <Processor>TextureProcessor</Processor> 206 </Compile> 207 </ItemGroup> 208 <ItemGroup> 209 <Compile Include="perusasento B.png"> 210 <Name>perusasento B</Name> 211 <Importer>TextureImporter</Importer> 212 <Processor>TextureProcessor</Processor> 213 </Compile> 214 </ItemGroup> 215 <ItemGroup> 216 <Compile Include="combo 1.png"> 217 <Name>combo 1</Name> 218 <Importer>TextureImporter</Importer> 219 <Processor>TextureProcessor</Processor> 220 </Compile> 221 <Compile Include="combo 2.png"> 222 <Name>combo 2</Name> 223 <Importer>TextureImporter</Importer> 224 <Processor>TextureProcessor</Processor> 225 </Compile> 226 <Compile Include="combo 3.png"> 227 <Name>combo 3</Name> 333 <Compile Include="rasengan7.png"> 334 <Name>rasengan7</Name> 335 <Importer>TextureImporter</Importer> 336 <Processor>TextureProcessor</Processor> 337 </Compile> 338 <Compile Include="rasengan8.png"> 339 <Name>rasengan8</Name> 340 <Importer>TextureImporter</Importer> 341 <Processor>TextureProcessor</Processor> 342 </Compile> 343 <Compile Include="rasengan9.png"> 344 <Name>rasengan9</Name> 345 <Importer>TextureImporter</Importer> 346 <Processor>TextureProcessor</Processor> 347 </Compile> 348 </ItemGroup> 349 <ItemGroup> 350 <Compile Include="pallo.png"> 351 <Name>pallo</Name> 228 352 <Importer>TextureImporter</Importer> 229 353 <Processor>TextureProcessor</Processor> -
2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasukeContent/kentta1.txt
r3746 r3767 3 3 4 4 5 6 7 8 9 10 11 #### 12 13 #### 5 ######### ######## 6 7 #### 8 #### ##### 9 10 #### ##### 11 #### 12 #### 13 #### 14 14 #### 15 15 … … 19 19 20 20 N S 21 ########################### 21 ################################
Note: See TracChangeset
for help on using the changeset viewer.