Changeset 5858 for 2015/23/ToukoA/FatalShot
- Timestamp:
- 2015-06-02 17:32:02 (8 years ago)
- Location:
- 2015/23/ToukoA/FatalShot/FatalShot
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/23/ToukoA/FatalShot/FatalShot/FatalShot/FatalShot.cs
r5856 r5858 13 13 Image poliisiAmpuuKuva = LoadImage ("pelaajav1"); 14 14 Image poliisinKuva = LoadImage ("pelaajav1"); 15 16 Image veriLantti = LoadImage ("verilantti"); 15 17 Vector nopeusYlos = new Vector(0, 400); 16 18 Vector nopeusAlas = new Vector(0, -400); … … 28 30 29 31 TileMap kentta = TileMap.FromLevelAsset("kentta"); 30 Level.Background.Color = Color. Brown;32 Level.Background.Color = Color.Gray; 31 33 kentta.SetTileMethod('%', luoPelaaja); 32 34 kentta.SetTileMethod('#', lisaaTaso1); … … 68 70 if (ammus != null) 69 71 { 70 ase.Power.DefaultValue = 350;71 ase.FireRate = 4;72 ase.Power.DefaultValue = 200; 73 ase.FireRate = 8; 72 74 ammus.Size *= 0.45; 73 75 ammus.MaximumLifetime = TimeSpan.FromSeconds(4); 76 74 77 } 75 78 … … 94 97 95 98 pelaajan1Ase = new AssaultRifle(30, 10); 96 pelaajan1Ase.Ammo.Value = 100; 99 //pelaajan1Ase.Ammo.Value = 100; 100 pelaajan1Ase.InfiniteAmmo = true; 97 101 pelaajan1Ase.ProjectileCollision = AmmusOsui; 98 102 … … 111 115 112 116 FollowerBrain seuraajaAivot = new FollowerBrain(pelaaja1); 117 RandomMoverBrain randomAivot = new RandomMoverBrain(); 118 randomAivot.ChangeMovementSeconds = 3; 113 119 114 120 AssaultRifle pahisAse = new AssaultRifle(30, 10); … … 123 129 seuraajaAivot.Active = true; 124 130 seuraajaAivot.Speed = 400; 125 seuraajaAivot.DistanceClose = 450; 126 seuraajaAivot.DistanceFar = 5000; 131 seuraajaAivot.DistanceClose = 350; 132 seuraajaAivot.DistanceFar = 1000; 133 134 seuraajaAivot.FarBrain = randomAivot; 127 135 seuraajaAivot.TargetClose += delegate { pahisAmpuu(pahisAse, pahis); }; 128 136 seuraajaAivot.StopWhenTargetClose = true; … … 141 149 if (ammus != null) 142 150 { 143 ase.Power.DefaultValue = 3 50;151 ase.Power.DefaultValue = 300; 144 152 ase.FireRate = 8; 153 ase.CanHitOwner = false; 145 154 ammus.Size *= 0.45; 146 155 ammus.MaximumLifetime = TimeSpan.FromSeconds(4); … … 159 168 if (kohde.Tag.Equals("paha")) 160 169 { 170 171 Explosion rajahdys = new Explosion(5000); 172 rajahdys.Image = veriLantti; 173 rajahdys.MaxRadius = 70; 174 rajahdys.Force = 500; 175 rajahdys.Speed = 100; 176 rajahdys.Position = kohde.Position; 177 rajahdys.ShockwaveColor = new Color(0, 0, 0, 0); 178 179 Add(rajahdys); 180 181 GameObject verilantti = new GameObject(30, 30); 182 verilantti.Position = kohde.Position; 183 verilantti.Image = veriLantti; 184 //verilantti.IgnoresCollisionResponse = true; 185 Add(verilantti, -3); 186 //verilantti.MaxVelocity = 0; 187 //verilantti.CollisionIgnoreGroup = 1; 188 161 189 (kohde as Pahis).Ase.Destroy(); 190 (kohde as Pahis).Destroy(); 162 191 } 163 192 … … 165 194 { 166 195 (kohde as Hyvis).Ase.Destroy(); 167 }168 169 kohde.Destroy(); 196 (kohde as Hyvis).Destroy(); 197 } 198 170 199 } 171 200 -
2015/23/ToukoA/FatalShot/FatalShot/FatalShotContent/FatalShotContent.contentproj
r5856 r5858 59 59 </Compile> 60 60 </ItemGroup> 61 <ItemGroup> 62 <Compile Include="verilantti.png"> 63 <Name>verilantti</Name> 64 <Importer>TextureImporter</Importer> 65 <Processor>TextureProcessor</Processor> 66 </Compile> 67 </ItemGroup> 61 68 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 62 69 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/23/ToukoA/FatalShot/FatalShot/FatalShotContent/kentta.txt
r5856 r5858 1 .....#.......................############################## 2 .....#...........#.#########..#.......############..#.....# 3 .....#...........#########..#.......###############.#..#### 4 ####.#...........#########..#..............&&&&&..........# 5 .....#...........###########..&#.......###########.##.##### 6 ..%..#########################.&..#......#########..#.....# 7 .....#...........#....#.....######################..#.....# 1 ########################## 2 #........................# 3 #............#...........# 4 #%...........&.&.&.......# 5 #............#...........# 6 #....&...................# 7 #........................# 8 #........................# 9 #........................# 10 #........................# 11 #........................# 12 #........................# 13 #........................# 14 #........................# 15 #........................# 16 #........................# 17 ##########################
Note: See TracChangeset
for help on using the changeset viewer.