- Timestamp:
- 2015-06-30 14:17:13 (8 years ago)
- Location:
- 2015/27/JimiS/tasohyppely/hyppely
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.cs
r6580 r6591 49 49 kentta.SetTileMethod('N', LisaaPelaaja); 50 50 kentta.SetTileMethod('A', LisaaPalikka); 51 kentta.SetTileMethod('V', LisaaVihu); 51 52 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 52 53 … … 56 57 alaReuna.IsVisible = false; 57 58 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 59 } 60 61 void LisaaVihu(Vector paikka, double leveys, double korkeus) 62 { 63 PlatformCharacter vihu = new PlatformCharacter(leveys, korkeus); 64 vihu.Position = paikka; 65 vihu.Color = Color.Black; 66 vihu.Tag = "pahis"; 67 Add(vihu); 58 68 } 59 69 … … 92 102 pelaaja1.Image = pelaajanKuva; 93 103 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 104 AddCollisionHandler(pelaaja1, "pahis", TormaaVihuun); 94 105 Add(pelaaja1); 95 106 … … 108 119 } 109 120 121 void TormaaVihuun(PhysicsObject pelaaja, PhysicsObject vihu) 122 { 123 MessageDisplay.Add("Auts! Törmäsit Vihuun!"); 124 125 pelaajan1Elamat.Value -= 1; 126 127 pelaaja1.Position = pelaajanaloituspaikka; 128 129 if (pelaajan1Elamat == 0) 130 { 131 pelaaja1.Destroy(); 132 MessageDisplay.Add("Pelaaja 1 hävisi pelin."); 133 Timer.SingleShot(3.0, Exit); 134 } 135 } 136 137 110 138 void KasittelePelaajanPutoaminen(PhysicsObject pelaaja1, PhysicsObject kohde) 111 139 { … … 116 144 117 145 if (pelaajan1Elamat == 0) 118 { 146 { 147 pelaaja1.Destroy(); 119 148 MessageDisplay.Add("Pelaaja 1 hävisi pelin."); 120 Exit();149 Timer.SingleShot(3.0, Exit); 121 150 } 122 151 -
2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/ContentPipeline-{9937689A-33E5-40B9-A7B6-3F1206C3B37D}.xml
r6580 r6591 45 45 <Options>None</Options> 46 46 <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\kentta1.xnb</Output> 47 <Time>2015-06-30T1 2:50:04.0061583+03:00</Time>47 <Time>2015-06-30T14:15:37.697181+03:00</Time> 48 48 </Item> 49 49 <BuildSuccessful>true</BuildSuccessful> -
2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppelyContent/kentta1.txt
r6580 r6591 1 1 ..... 2 2 3 3 … … 7 7 8 8 9 * 10 * AAAAA 11 ##### AAAAA 12 # * 13 # ###### ##### 14 15 N 16 ################## ######### #########9 ............................................ 10 .........*.................................. 11 ........#####............................... 12 ..............#.......V..............AAA.... 13 ...............#...######...........V....... 14 ...............................AAAAAAAAAAAAA 15 ...N....V................................... 16 ##################...#########..............
Note: See TracChangeset
for help on using the changeset viewer.