- Timestamp:
- 2012-04-18 14:28:36 (11 years ago)
- Location:
- 2012/JAO/Tero/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/JAO/Tero/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs
r2717 r2719 78 78 void AloitaPeli() 79 79 { 80 ClearAll(); 80 81 Gravity = new Vector(0, -1000); 81 82 … … 92 93 TileMap kentta = TileMap.FromFile("kentta1.txt"); 93 94 kentta.SetTileMethod('#', lisaaTaso); 95 kentta.SetTileMethod('?', lisaaTaso2); 94 96 kentta.SetTileMethod('*', lisaatonni); 95 97 kentta.SetTileMethod('T', lisaamassi); … … 99 101 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 100 102 Level.CreateBorders(); 101 Level.Background.CreateGradient(Color.Bl ack, Color.Black);103 Level.Background.CreateGradient(Color.Blue, Color.Blue); 102 104 } 103 105 … … 106 108 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 107 109 taso.Position = paikka; 108 taso.Color = Color.White; 110 taso.Color = Color.Orange; 111 Add(taso); 112 } 113 114 void lisaaTaso2(Vector paikka, double leveys, double korkeus) 115 { 116 IPhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 117 taso.Position = paikka; 118 taso.Color = Color.Blue; 109 119 Add(taso); 110 120 } … … 184 194 } 185 195 186 IntMeter pisteLaskuri;187 188 void LuoLaskuri()189 {190 pisteLaskuri = new IntMeter(0);191 192 Label pisteNaytto = new Label();193 pisteNaytto.X = Screen.Left + 100;194 pisteNaytto.Y = Screen.Top + 100;195 pisteNaytto.TextColor = Color.Red;196 197 pisteNaytto.BindTo(pisteLaskuri);198 Add(pisteNaytto);199 }200 201 196 void AmmuAseella() 202 197 { -
2012/JAO/Tero/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/kentta1.txt
r2717 r2719 1 1 V T 2 T 3 V T TV4 V #### ######## ***2 T ?????? 3 V ** ????????? *** 4 V ####### # 5 5 ** ** ### # 6 ### ###### **##### #6 ### ###### ** ##### # 7 7 * * V * * * * ## ** ####### # 8 8 ## ## ## ## ## ##### ## ### ######### B #
Note: See TracChangeset
for help on using the changeset viewer.