- Timestamp:
- 2010-08-06 12:59:59 (10 years ago)
- Location:
- 2010/31/rimapuha/NorsuPeli/NorsuPeli
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/31/rimapuha/NorsuPeli/NorsuPeli/Content/Content.contentproj
r1631 r1663 75 75 </Compile> 76 76 </ItemGroup> 77 <ItemGroup> 78 <Compile Include="seina.png"> 79 <Name>seina</Name> 80 <Importer>TextureImporter</Importer> 81 <Processor>TextureProcessor</Processor> 82 </Compile> 83 </ItemGroup> 84 <ItemGroup> 85 <Compile Include="valeseina.png"> 86 <Name>valeseina</Name> 87 <Importer>TextureImporter</Importer> 88 <Processor>TextureProcessor</Processor> 89 </Compile> 90 </ItemGroup> 91 <ItemGroup> 92 <Compile Include="kranaatti.png"> 93 <Name>kranaatti</Name> 94 <Importer>TextureImporter</Importer> 95 <Processor>TextureProcessor</Processor> 96 </Compile> 97 </ItemGroup> 98 <ItemGroup> 99 <Compile Include="kranaatti2.png"> 100 <Name>kranaatti2</Name> 101 <Importer>TextureImporter</Importer> 102 <Processor>TextureProcessor</Processor> 103 </Compile> 104 </ItemGroup> 77 105 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 78 106 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/31/rimapuha/NorsuPeli/NorsuPeli/Peli.cs
r1631 r1663 106 106 lisaaNappaimet(); 107 107 Camera.Follow(pelaaja1); 108 Camera.ZoomFactor = 1. 0;108 Camera.ZoomFactor = 1.5; 109 109 Camera.StayInLevel = true; 110 110 … … 117 117 } 118 118 119 HighScoreListtopLista;119 //HighScoreList dddtopLista; 120 120 protected override void Begin() 121 121 { 122 /* 122 123 topLista = HighScoreList.LoadOrCreate("topten.dat", 10); 123 //topLista.Show(pistemaara);124 topLista.Show(pistemaara); 124 125 topLista.ScreenList.ItemColor = Color.Red; 125 126 topLista.ScreenList.BackGroundColor = Color.Black; 127 * */ 126 128 Valikko(); 127 129 … … 134 136 kranaatti.X = pelaaja.X + 10; 135 137 kranaatti.Y = pelaaja.Y + 10; 138 kranaatti.Image = LoadImage("kranaatti2"); 136 139 Add(kranaatti); 137 140 Vector heittoVoima = Vector.FromLengthAndAngle(4000, Angle.Degrees(45)); … … 144 147 ruudut['='] = LuoPalikka; 145 148 ruudut['*'] = LuoTahti; 149 ruudut['+'] = LuoValeseina; 146 150 ruudut['1'] = LuoPelaaja1; 147 151 //ruudut['2'] = LuoPelaaja2; … … 153 157 { 154 158 PhysicsObject palikka = PhysicsObject.CreateStaticObject(50, 50); 159 palikka.Image = LoadImage ("seina"); 155 160 return palikka; 161 } 162 163 GameObject LuoValeseina() 164 { 165 GameObject valeseina = new GameObject(50, 50); 166 valeseina.Image = LoadImage("valeseina"); 167 return valeseina; 156 168 } 157 169 … … 174 186 175 187 176 177 // PhysicsObject LuoMaali()178 // {179 // PhysicsObject maali = PhysicsObject.CreateStaticObject();180 // maali.Image = Load.Image ("maali");181 // }182 183 188 void Tormays(PhysicsObject tahti, PhysicsObject kohde) 184 189 { … … 191 196 void Tormays2(PhysicsObject maali, PhysicsObject kohde) 192 197 { 193 if (kohde == pelaaja1 && pisteLaskuri.Value == 9) 194 195 ClearAll(); 196 MessageDisplay.Add("Voitit pelin!!!"); 198 if (kohde == pelaaja1 && pisteLaskuri.Value >= 80) 199 { 200 ClearAll(); 201 MessageDisplay.Add("Voitit pelin!!!"); 202 Valikko(); 203 } 197 204 } 198 205 … … 239 246 ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, liikuta, "Pelaaja liikkuu vasemmalle", pelaaja1, -nopeus); 240 247 ControllerOne.Listen(Button.DPadRight, ButtonState.Down, liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 241 ControllerOne.Listen(Button.A, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja1, hyppyVoima); 248 ControllerOne.Listen(Button.LeftTrigger, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja1, hyppyVoima); 249 ControllerOne.Listen(Button.RightTrigger, ButtonState.Pressed, HeitaKranaatti, "heittää kranaatin", pelaaja1); 242 250 } 243 251 -
2010/31/rimapuha/NorsuPeli/NorsuPeli/kentta.txt
r1631 r1663 7 7 = * = 8 8 ====================================== ======== ** === = 9 = ========================== ======== =******= === *** =9 =+++++++++++++++++++++++++= ======== =******= === *** = 10 10 =========================== = == == ******= *** = 11 11 =* == = = == ============= = 12 12 =============================== = = ====== = 13 = ===================================== = === =13 =+++++++++++++++++++++++++++++======== = === = 14 14 ====================================== = === = 15 15 = = === ** **= 16 = ***** = ======== **= =17 = ================ **== =18 = = =============== ****====19 = = =============*= =========16 = ***** = ======== **=+ 17 = ================ **==+ 18 = =++++++++++++=== ****==++ 19 = =++++++++=====*= ========= 20 20 = ==========* = === = 21 = 0=== * =21 = 0 === * = 22 22 ================================================ ** =========== == 23 = * ===================== == =24 = * ====== * ====25 = ===== ===== ===== ========================26 =* = ========== ****==27 == * * ======= = ==============================****==28 === ================ ===============================***=== 29 ==== ==============*** * * * * ****==== 30 ===== ======================================================31 ====== 21 * =32 ===================================================================================23 = * ===================== ==+ 24 = * ======= * ==++ 25 = ===== =====+++++= ======================= 26 =* =+++++++++= *=+ 27 == * * ======= =+++++++++===================== **=+ 28 +== ================ =++++++++++++================== *==+ 29 ++== =++++++++++++=*** * * * * **==++ 30 +++== ====================================================== 31 ++++== 21 * = 32 +++++==============================================================================
Note: See TracChangeset
for help on using the changeset viewer.