- Timestamp:
- 2011-06-29 12:26:41 (12 years ago)
- Location:
- 2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix/Peli.cs
r2267 r2273 8 8 9 9 public class Peli : PhysicsGame 10 10 11 { 11 12 const double nopeus = 200; … … 14 15 15 16 PlatformCharacter pelaaja1; 17 GameObject heppu; 18 16 19 17 20 Image pelaajanKuva = LoadImage("norsu"); … … 24 27 Image vesiKuva = LoadImage("vesi"); 25 28 Image pilvikuva = LoadImage("pilvi"); 29 Image heppukuva = LoadImage("heppu"); 30 Image ruohokuva = LoadImage("ruoho"); 26 31 27 32 … … 53 58 kentta[';'] = lisaavesi; 54 59 kentta['B'] = lisaapilvi; 60 kentta['H'] = lisaaheppu; 61 kentta['='] = lisaaruoho; 62 63 55 64 56 65 … … 58 67 Level.CreateBorders(); 59 68 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 69 } 70 PhysicsObject lisaaruoho() 71 { 72 PhysicsObject ruoho = PhysicsObject.CreateStaticObject(50, 50); 73 ruoho.Image = ruohokuva; 74 ruoho.Tag = "ruoho"; 75 76 Add(ruoho); 77 return ruoho; 60 78 } 61 79 PhysicsObject lisaapilvi() … … 132 150 return tahti; 133 151 } 134 152 GameObject lisaaheppu() 153 { 154 GameObject heppu = new GameObject(50, 50); 155 156 heppu. Image = heppukuva; 157 Add(heppu); 158 return heppu; 159 } 135 160 PlatformCharacter lisaaPelaaja() 136 161 { … … 167 192 hahmo.Jump(nopeus); 168 193 } 169 194 void osupelaajaan(GameObject hahmo, PlatformCharacter kohde) 195 { 196 if (kohde.Tag.ToString() == "pelaaja1") 197 { 198 maaliAani.Play(); 199 MessageDisplay.Add("Die"); 200 kohde.Destroy(); 201 } 202 } 170 203 void osuTahteen(PhysicsObject hahmo, PhysicsObject kohde) 171 204 { -
2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix/kentta1.txt
r2256 r2273 21 21 %%################## ##%%%%%%%%%%####################################################### #######################################################################################;;;;;;;;;;;;; %%#%%%%%%%%%%%##%##### 22 22 %%################################################ %%%% ### #########################^^########### ############################ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###################################################;;;;;;;;;;;;; 23 %%##################################################### %%%%% %% ### ####%%%%%%%^^^^^^^^^^^^^^^^^^########## ############################ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23 %%##################################################### %%%%% %% H ### ####%%%%%%%^^^^^^^^^^^^^^^^^^########## ############################ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 24 24 %%###########################################################;;;;;;;;;;;;;;;##%%%%%============================= ======== #####=============================########^^^^^^^^^^^^^^%%%%%%%%%%%%%%%%######### ########################### 25 25 ###########^^^^^^^^^^#########################################;;;;;;;;;;;;;#####################################;;;;#########;;;;;;;;;;;;############################################################################################ %%%%%%%%%%%%%%%%%%%%%%%%% -
2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fixContent/world of Chuckland fix fixContent.contentproj
r2266 r2273 143 143 </Compile> 144 144 </ItemGroup> 145 <ItemGroup> 146 <Compile Include="heppu.bmp"> 147 <Name>heppu</Name> 148 <Importer>TextureImporter</Importer> 149 <Processor>TextureProcessor</Processor> 150 </Compile> 151 </ItemGroup> 145 152 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 146 153 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.