Changeset 1668
- Timestamp:
- 2010-08-06 13:02:12 (12 years ago)
- Location:
- 2010/31/hesasnel/Teron seikkailu
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/31/hesasnel/Teron seikkailu/Content/Content.contentproj
r1626 r1668 152 152 </Compile> 153 153 </ItemGroup> 154 <ItemGroup> 155 <Compile Include="Eikerrassaanmitään.png"> 156 <Name>Eikerrassaanmitään</Name> 157 <Importer>TextureImporter</Importer> 158 <Processor>TextureProcessor</Processor> 159 </Compile> 160 </ItemGroup> 154 161 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 155 162 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/31/hesasnel/Teron seikkailu/Kenttä1.txt
r1627 r1668 1 ======= ==== ==== 2 ======= ==== ==== 3 ======= ====.. ......................... ==== 4 ======= ======.. ========================= ==== 5 ======= ========.. = = ==== 6 ======= ==========.. = ============= ==== 7 ======= ============.. = M = ==== 8 ........... ======= ================ = ================ ==== 9 =========== ======= = ==== 10 =========== ======= = ==== 11 =========== ======= = ================= 12 =========== ======= .= ==== 13 =========== .== ==== 14 =========== .=== T ==== 15 =========== ............ ........ .================================================== 16 =========== ============ ========. .===== 17 =========== ==== =========. .====== 18 =========== ==== ==========. .======= 19 =========== F ==== ===========. .======== 20 =========== ==== ============.......................========= 21 ===========............................................ ============================================ 22 ======================================================= ============================================ 23 ======================================================= ============================================ 1 ======= ==== ==== 2 ======= ==== ==== 3 ======= ==== ==== 4 ======= ==== ==== 5 ======= ==== ==== 6 ======= ==== .............................. ==== 7 ======= ==== = = ==== 8 P ======= ==== = ========== ==== 9 ======= ====.. = M = ==== 10 ======= ======.. = = ==== 11 ======= ========. = = ==== 12 ======= =========. = ................= ==== 13 ======= ==========.. = ================= ============= 14 ======= ============.. = = ==== 15 ........... ======= ================ = = ==== 16 =========== ======= = = ==== 17 =========== ======= = = ==== 18 =========== ======= = ========== ==== 19 =========== ======= .= ==== 20 =========== .== ==== 21 =========== .=== ==== 22 =========== ........... ........ .==== ==== 23 =========== ============ ========. .===== T ==== 24 =========== ==== =========. .==================================================== 25 =========== ==== ==========. .======= 26 =========== F ==== ===========. .======== 27 =========== ==== ============.......................========= 28 ===========............................................ ============================================ 29 ======================================================= ============================================ 30 =======================================================DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD============================================ -
2010/31/hesasnel/Teron seikkailu/Peli.cs
r1626 r1668 14 14 Vector normaalipainovoima = new Vector(0, -1000); 15 15 Vector leijumisvoima = new Vector(0, 50); 16 Vector aloitusPaikka; 16 17 17 18 Image paikallaanVasemmalle = LoadImage("Tero vasen"); … … 22 23 Image[] hyppyVasemmalle = LoadImages ("Tero hyppää vasen"); 23 24 Image[] leijuntaOikealle = LoadImages("ropelli pyörii","ropelli pyörii2"); 24 Image[] leijuntaVasemmalle = LoadImages("ropelli pyörii vasen ,ropelli pyörii2 vasen");25 Image[] leijuntaVasemmalle = LoadImages("ropelli pyörii vasen", "ropelli pyörii2 vasen"); 25 26 Image[] multa = LoadImages("multa"); 26 27 Image[] ruoho = LoadImages("Ruohikko"); … … 33 34 Animation hyppyanim; 34 35 Animation kavelyanim; 36 Animation leijuntaOikealleanim; 37 Animation leijuntaVasemmalleanim; 35 38 PlatformCharacter pelaaja1; 36 39 … … 40 43 hyppyanim = new Animation(hyppyOikealle); 41 44 //kavelyanim = new Animation(); 45 leijuntaOikealleanim = new Animation(leijuntaOikealle); 46 leijuntaVasemmalleanim = new Animation(leijuntaVasemmalle); 42 47 43 48 luoKentta(); … … 57 62 ruudut['T'] = LuoTramppa; 58 63 ruudut['M'] = LuoOvi; 64 ruudut['P'] = LuoTero; 65 ruudut['D'] = LuoPohjatonrotko; 59 66 ruudut.Insert(ruudunLeveys, ruudunKorkeus); 60 67 Level.CreateBorders(); 61 Level.Background.CreateGradient(Color.SkyBlue, Color. SkyBlue);62 63 64 lisaaPelaajat();68 Level.Background.CreateGradient(Color.SkyBlue, Color.Blue); 69 70 aloitusPaikka = pelaaja1.Position; 71 //lisaaPelaajat(); 65 72 } 66 73 … … 101 108 kohde.Destroy(); 102 109 taikajuomakaytossa = true; 103 104 110 } 105 111 if (tagi == "taso") 106 112 { 107 113 //Gravity = normaalipainovoima; 114 } 115 if (tagi == "pohjatonrotko") 116 { 117 pelaaja1.Position = aloitusPaikka; 118 } 119 if (tagi == "tramppa") 120 { 121 //Gravity = new Vector(0, -50); 122 //pelaaja1.Velocity = new Vector(1000.0, 0.0); 123 //pelaaja1.Hit(new Vector(0.0, 7000.0)); 124 pelaaja1.Jump(-7000.0); 125 } 126 if (tagi == "OVI") 127 { 128 108 129 } 109 130 } … … 132 153 { 133 154 //Gravity = new Vector(0, -200); 155 134 156 pelaaja1.Hit(leijumisvoima); 157 pelaaja1.Animation = new Animation(leijuntaOikealle); 158 pelaaja1.Animation = new Animation(leijuntaVasemmalle); 135 159 } 136 160 } … … 148 172 } 149 173 PhysicsObject LuoMulta() 150 {151 PhysicsObject multa = PhysicsObject.CreateStaticObject(31.0,31.0);152 multa.Image = LoadImage("multa");153 return multa;154 155 }174 { 175 PhysicsObject multa = PhysicsObject.CreateStaticObject(31.0,31.0); 176 multa.Image = LoadImage("multa"); 177 return multa; 178 179 } 156 180 PhysicsObject LuoRuohikko() 157 181 { 158 PhysicsObject Ruohikko = PhysicsObject.CreateStaticObject(31.0, 31.0);159 Ruohikko.Image = LoadImage("Ruohikko");160 Ruohikko.Tag = "taso";161 return Ruohikko;182 PhysicsObject Ruohikko = PhysicsObject.CreateStaticObject(31.0, 31.0); 183 Ruohikko.Image = LoadImage("Ruohikko"); 184 Ruohikko.Tag = "taso"; 185 return Ruohikko; 162 186 } 163 187 PhysicsObject LuoTaikajuoma() … … 172 196 PhysicsObject Tramppa = PhysicsObject.CreateStaticObject(80.0, 50.0); 173 197 Tramppa.Image = LoadImage("Tramppa"); 198 Tramppa.Tag = "tramppa"; 174 199 return Tramppa; 175 200 } 176 201 PhysicsObject LuoOvi() 177 202 { 178 PhysicsObject Ovi = PhysicsObject.CreateStaticObject(50.0, 1 00.0);203 PhysicsObject Ovi = PhysicsObject.CreateStaticObject(50.0, 140.0); 179 204 Ovi.Image = LoadImage("Ovi"); 205 Ovi.Tag = "OVI"; 180 206 return Ovi; 207 } 208 PhysicsObject LuoTero() 209 { 210 pelaaja1 = new PlatformCharacter(70, 100); 211 pelaaja1.Shape = Shapes.FromImage(LoadImage("Tero")); 212 pelaaja1.Mass = 4.0; 213 pelaaja1.KineticFriction = 0.0; 214 pelaaja1.Image = LoadImage("Tero"); 215 AddCollisionHandler(pelaaja1, KasittelePelaajanTormays); 216 pelaaja1.LeftIdleAnimation = new Animation(paikallaanVasemmalle); 217 pelaaja1.RightIdleAnimation = new Animation(paikallaanOikealle); 218 219 pelaaja1.LeftWalkingAnimation = new Animation(kavelyVasemmalle); 220 pelaaja1.RightWalkingAnimation = new Animation(kavelyOikealle); 221 return (PhysicsObject)pelaaja1; 222 } 223 PhysicsObject LuoPohjatonrotko() 224 { 225 PhysicsObject Pohjatonrotko = PhysicsObject.CreateStaticObject(31.0, 31.0); 226 //Pohjatonrotko.Image = LoadImage("Eikerrassaanmitään"); 227 Pohjatonrotko.Tag = "pohjatonrotko"; 228 Pohjatonrotko.IsVisible = false; 229 230 return Pohjatonrotko; 181 231 } 182 232
Note: See TracChangeset
for help on using the changeset viewer.