Changeset 7336
- Timestamp:
- 2016-06-15 14:57:04 (7 years ago)
- Location:
- 2016/24/MattiK/ZlandZ
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/ZlandZ.cs
r7291 r7336 15 15 PlatformCharacter Leaf; 16 16 PlatformCharacter Sombombo; 17 PlatformCharacter Orkki; 18 19 LaserGun LeafinAse; 17 20 18 21 Image pelaajanKuva = LoadImage("lintu"); 22 Image orkki = LoadImage("orkki"); 19 23 Image GuninKuva = LoadImage("gun"); 20 24 Image BossinKuva = LoadImage("Boss"); … … 30 34 31 35 LuoKentta(); 32 36 33 37 LisaaNappaimet(); 34 38 LuoAmmusLaskuri(); … … 46 50 kentta.SetTileMethod('#', LisaaTaso); 47 51 kentta.SetTileMethod('G', Lisaagun); 52 kentta.SetTileMethod('O', LisaaOrkki); 48 53 kentta.SetTileMethod('B', LisaaBoss); 49 54 kentta.SetTileMethod('b', LisaaBox); … … 54 59 Level.CreateBorders(); 55 60 Level.Background.CreateGradient(Color.Black, Color.Red); 56 57 } 58 59 60 61 62 } 63 64 65 void LisaaTaso(Vector paikka, double leveys, double korkeus) 61 66 { 62 67 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); … … 76 81 void LisaaBoss(Vector paikka, double leveys, double korkeus) 77 82 { 78 PlatformCharacter Boss = new PlatformCharacter(leveys, korkeus);83 PlatformCharacter Boss = new PlatformCharacter(leveys, korkeus); 79 84 Boss.Position = paikka; 80 85 Add(Boss); … … 87 92 Boss.Brain = tasoAivot; 88 93 } 94 void LisaaOrkki(Vector paikka, double leveys, double korkeus) 95 { 96 PlatformCharacter Orkki = new PlatformCharacter(200, 200); 97 Orkki.Position = paikka; 98 Add(Orkki); 99 Orkki.Image = orkki; 100 Orkki.Tag = "pahis"; 101 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 102 tasoAivot.Speed = 50; 103 tasoAivot.Active = true; 104 105 Orkki.Brain = tasoAivot; 106 } 89 107 IntMeter ammusLaskuri; 90 108 … … 122 140 Sombombo.Position = paikka; 123 141 124 142 125 143 126 144 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); … … 129 147 Sombombo.Brain = tasoAivot; 130 148 } 149 131 150 void Lisaagun(Vector paikka, double leveys, double korkeus) 132 151 { 133 PhysicsObject gun = new PhysicsObject(leveys, korkeus); 152 PhysicsObject gun = PhysicsObject.CreateStaticObject(leveys, korkeus); 153 //gun.IgnoresCollisionResponse = true; 154 gun.Position = paikka; 155 gun.Image = GuninKuva; 156 gun.Tag = "gun"; 134 157 Add(gun); 135 gun.Image = LoadImage("gun"); 136 gun.Tag = "gun"; 137 gun.Position = paikka; 138 } 139 140 141 142 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 158 } 159 160 161 162 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 143 163 { 144 164 Leaf = new PlatformCharacter(leveys, korkeus); … … 147 167 Leaf.Image = pelaajanKuva; 148 168 AddCollisionHandler(Leaf, "Box", TormaaTahteen); 169 AddCollisionHandler(Leaf, "gun", TormaaGuniin); 149 170 AddCollisionHandler(Leaf, "pahis", TormaaVihuun); 150 171 AddCollisionHandler(Leaf, "piikki", TormaaPiikkiin); … … 174 195 if (ammus != null) 175 196 { 176 197 177 198 //ammus.Size *= 3; 178 199 //ammus.Image = ... … … 202 223 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", Leaf, hyppyNopeus); 203 224 204 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 225 226 205 227 } 206 228 … … 228 250 hahmo.Destroy(); 229 251 } 230 void TormaaPiikkiin(PhysicsObject hahmo, PhysicsObject piikki)252 void TormaaOrkkiin(PhysicsObject hahmo, PhysicsObject orkki) 231 253 { 232 254 maaliAani.Play(); … … 234 256 hahmo.Destroy(); 235 257 } 258 void TormaaGiantiin(PhysicsObject hahmo, PhysicsObject Giant) 259 { 260 maaliAani.Play(); 261 MessageDisplay.Add("You died"); 262 Giant.Destroy(); 263 } 264 void TormaaPiikkiin(PhysicsObject hahmo, PhysicsObject piikki) 265 { 266 maaliAani.Play(); 267 MessageDisplay.Add("You died"); 268 hahmo.Destroy(); 269 } 270 void TormaaGuniin(PhysicsObject hahmo, PhysicsObject gun) 271 { 272 maaliAani.Play(); 273 MessageDisplay.Add("Keräsit Aseen!"); 274 gun.Destroy(); 275 276 Leaf.Weapon = new PlasmaCannon(20, 5); 277 Leaf.Weapon.Ammo.Value = 60; 278 Leaf.Weapon.FireRate = 1; 279 Leaf.Weapon.ProjectileCollision = AmmusOsui; 280 } 281 236 282 } -
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/ZlandZ.csproj.Debug.cachefile
r7291 r7336 10 10 Content\Jump17.xnb 11 11 Content\gun.xnb 12 Content\orkki.xnb -
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7291 r7336 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2016-06-1 4T14:52:07.8748476+03:00</Time>38 <Time>2016-06-15T14:40:38.3402243+03:00</Time> 39 39 </Item> 40 40 <Item> … … 101 101 <Time>2016-06-14T14:34:19.1299838+03:00</Time> 102 102 </Item> 103 <Item> 104 <Source>orkki.png</Source> 105 <Name>orkki</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\orkki.xnb</Output> 110 <Time>2016-06-15T13:25:01.0026751+03:00</Time> 111 </Item> 103 112 <BuildSuccessful>true</BuildSuccessful> 104 113 <Settings> -
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/obj/x86/Debug/ZlandZ.csproj.FileListAbsolute.txt
r7291 r7336 18 18 C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\Jump17.xnb 19 19 C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\gun.xnb 20 C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\orkki.xnb -
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7291 r7336 10 10 Content\Jump17.xnb 11 11 Content\gun.xnb 12 Content\orkki.xnb -
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZContent/ZlandZContent.contentproj
r7291 r7336 116 116 </Compile> 117 117 </ItemGroup> 118 <ItemGroup> 119 <Compile Include="orkki.png"> 120 <Name>orkki</Name> 121 <Importer>TextureImporter</Importer> 122 <Processor>TextureProcessor</Processor> 123 </Compile> 124 </ItemGroup> 118 125 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 119 126 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2016/24/MattiK/ZlandZ/ZlandZ/ZlandZContent/kentta1.txt
r7291 r7336 3 3 4 4 5 N6 5 7 8 S S 9 ##### 10 S 11 #### 12 S 13 ### 14 S S bb S S S S S SS SS S SS S S S 15 S b S S S S S ####### ####################################### #### #### ### 16 #### #### ## ## ## ## ## ## # 17 18 G b b b PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 19 ################################################################################################################################################ 6 ################################################################################################################################################################################################ 7 8 # 9 10 # 11 12 # 13 b b b 14 S S # 15 # ### # b b b # P # P # # # b b b b 16 O S S ## ## S B S # P P # G P P P P # # # # # 17 N ####PPP#### PPP S PPPPPPP S PPP B ##P##P##P##P## # PPPPPPPPPPPPP # # # P P P P # S # S # S # 18 ############################################################################################################################################################################################################## 19
Note: See TracChangeset
for help on using the changeset viewer.