Changeset 8184
- Timestamp:
- 2016-07-28 10:56:37 (5 years ago)
- Location:
- 2016/30/TaavettiV/Street Alien Domination/Street Alien Domination
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street Alien DominationContent/Street Alien DominationContent.contentproj
r8175 r8184 67 67 </Compile> 68 68 </ItemGroup> 69 <ItemGroup> 70 <Compile Include="pomp.png"> 71 <Name>pomp</Name> 72 <Importer>TextureImporter</Importer> 73 <Processor>TextureProcessor</Processor> 74 </Compile> 75 </ItemGroup> 69 76 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 70 77 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street Alien DominationContent/kentta1.txt
r8175 r8184 1 1 #################################################################### 2 2 #..................................................................# 3 #...................................................... ............#3 #......................................................P...........# 4 4 #................................................####################............ 5 5 #...........................................##...#################### 6 #................................ .......##..........................#6 #................................P......##..........................# 7 7 #.............................#####................................# 8 8 #.............................######..............................# … … 11 11 #.............................##############.....................# 12 12 #.............................################....................#.. 13 #.........N........ ...............................................###.....13 #.........N........p..............................................###..... 14 14 #################################################################..#### 15 15 #################################################################........# 16 16 #####################################################################...## 17 17 ###################################################################......# 18 #......................................................... .............###.18 #.........................................................P............###. 19 19 ########################################################################## -
2016/30/TaavettiV/Street Alien Domination/Street Alien Domination/Street_Alien_Domination/Street_Alien_Domination.cs
r8183 r8184 18 18 Image tahtiKuva = LoadImage("tahti"); 19 19 20 Image pompKuva = LoadImage("pomp"); 21 20 22 SoundEffect maaliAani = LoadSoundEffect("maali"); 21 23 22 24 public override void Begin() 23 { 25 { PhysicsObject kissa = new PhysicsObject(40, 20); 26 kissa.Shape = Shape.Rectangle; 27 kissa.Mass = 10.0; 28 Add(kissa); 29 30 24 31 Gravity = new Vector(0, -1000); 25 32 … … 38 45 kentta.SetTileMethod('*', LisaaTahti); 39 46 kentta.SetTileMethod('N', LisaaPelaaja); 47 kentta.SetTileMethod('p', LisaaOlio); 40 48 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 41 49 Level.CreateBorders(); 42 50 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 51 43 52 } 44 53 … … 60 69 Add(tahti); 61 70 } 71 void LisaaOlio(Vector paikka, double leveys, double korkeus) 72 { 73 PlatformCharacter p = new PlatformCharacter(leveys, korkeus); 74 p.Position = paikka; 75 p.Image = pompKuva; 76 Add(p); 77 p.Tag = "p"; 78 79 80 81 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 82 tasoAivot.Speed = 100; 83 84 p.Brain = tasoAivot; 85 } 86 87 88 89 void Tormaap(PhysicsObject pelaaja1, PhysicsObject p) 90 { 91 pelaaja1.Destroy(); 92 93 Explosion rajahdys = new Explosion(50); 94 rajahdys.Position = p.Position; 95 Add(rajahdys); 96 } 62 97 63 98 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) … … 68 103 pelaaja1.Image = pelaajanKuva; 69 104 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 105 AddCollisionHandler(pelaaja1, "p", Tormaap); 70 106 Add(pelaaja1); 107 108 109 71 110 72 111 pelaaja1.Weapon = new AssaultRifle(30, 10);
Note: See TracChangeset
for help on using the changeset viewer.