Changeset 5329
- Timestamp:
- 2014-07-03 10:58:40 (9 years ago)
- Location:
- 2014/27/ArttuH
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/gamefusion.cs
r5303 r5329 9 9 public class gamefusion : PhysicsGame 10 10 { 11 const double nopeus = 200;11 const double nopeus = 300; 12 12 const double hyppyNopeus = 500; 13 13 const int RUUDUN_KOKO = 40; … … 40 40 kentta.SetTileMethod('N', LisaaPelaaja); 41 41 kentta.SetTileMethod('z', luozombie); 42 kentta.SetTileMethod('p', pelkokuva); 42 43 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 43 44 Level.CreateBorders(); … … 73 74 Add(pelaaja1); 74 75 pelaaja1.Weapon = new AssaultRifle(20, 5); 75 pelaaja1.Weapon.Ammo.Value = 10 ;76 pelaaja1.Weapon.Ammo.Value = 100000; 76 77 pelaaja1.Weapon.ProjectileCollision = ammusOsui; 78 pelaaja1.CollisionIgnoreGroup = 1; 79 AddCollisionHandler(pelaaja1, "pelkokuva", luopelkokuva); 77 80 } 78 81 … … 100 103 return; 101 104 } 102 pelaaja1.Walk(100 * tatinAsento.X); 105 pelaaja1.Walk(300 * tatinAsento.X); 106 luolima(); 107 103 108 } 104 109 … … 140 145 { 141 146 hahmo.Walk(nopeus); 147 luolima(); 142 148 } 143 149 void luoalkuvalikko() … … 165 171 166 172 Camera.Follow(pelaaja1); 167 Camera.ZoomFactor = 1. 2;173 Camera.ZoomFactor = 1.0; 168 174 Camera.StayInLevel = true; 169 175 } … … 194 200 195 201 196 PlatformCharacter zom die = new PlatformCharacter(leveys, korkeus);197 zom die.Position = paikka;198 zom die.Image = zombiekuva;199 Add(zom die);200 zom die.Tag = "zombie";202 PlatformCharacter zombie = new PlatformCharacter(leveys, korkeus); 203 zombie.Position = paikka; 204 zombie.Image = zombiekuva; 205 Add(zombie); 206 zombie.Tag = "zombie"; 201 207 FollowerBrain satunnaisAivot = new FollowerBrain(pelaaja1); 202 208 203 zomdie.Brain = satunnaisAivot; 204 205 206 } 209 zombie.Brain = satunnaisAivot; 210 211 212 } 213 void luolima() 214 { 215 PhysicsObject Lima = new PhysicsObject(5.0, 5.0); 216 Lima.Position = pelaaja1.Position; 217 Lima.Color = Color.Red; 218 Lima.LifetimeLeft = TimeSpan.FromSeconds(5); 219 Lima.CollisionIgnoreGroup = 1; 220 Lima.Mass = 0.1; 221 Lima.Y = pelaaja1.Y; 222 Lima.X = pelaaja1.X; 223 Add(Lima); 224 225 226 } 227 void pelkokuva(Vector paikka, double leveys, double korkeus) 228 { 229 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 230 taso.Position = paikka; 231 taso.Color = Color.Gray; 232 taso.IgnoresCollisionResponse = true; 233 taso.Tag = "pelkokuva"; 234 Add(taso); 235 } 236 void luopelkokuva(PhysicsObject pelaaja, PhysicsObject palikka) 237 { 238 palikka.Destroy(); 239 GameObject kuva = new GameObject(Level.Height * 1.3, Level.Height); 240 kuva.Image = pelaajanKuva; 241 Add(kuva); 242 Timer.SingleShot(1.0, delegate 243 { 244 kuva.Destroy(); 245 }); 246 247 Timer ajastin = new Timer(); 248 ajastin.Interval = 0.01; 249 ajastin.Timeout += delegate { kuva.Position = pelaaja1.Position; }; 250 ajastin.Start(); 251 } 252 253 207 254 } -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/gamefusion.csproj
r5227 r5329 19 19 <ApplicationIcon>Game.ico</ApplicationIcon> 20 20 <Thumbnail>GameThumbnail.png</Thumbnail> 21 <IsWebBootstrapper>false</IsWebBootstrapper> 22 <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 21 23 <PublishUrl>publish\</PublishUrl> 22 24 <Install>true</Install> … … 31 33 <ApplicationRevision>0</ApplicationRevision> 32 34 <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 33 <IsWebBootstrapper>false</IsWebBootstrapper>34 35 <UseApplicationTrust>false</UseApplicationTrust> 35 36 <BootstrapperEnabled>true</BootstrapperEnabled> 36 <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath>37 37 </PropertyGroup> 38 38 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> … … 60 60 <PlatformTarget>x86</PlatformTarget> 61 61 <XnaCompressContent>true</XnaCompressContent> 62 </PropertyGroup> 63 <PropertyGroup> 64 <TargetZone>LocalIntranet</TargetZone> 65 </PropertyGroup> 66 <PropertyGroup> 67 <GenerateManifests>false</GenerateManifests> 68 </PropertyGroup> 69 <PropertyGroup> 70 <ApplicationManifest>Properties\app.manifest</ApplicationManifest> 62 71 </PropertyGroup> 63 72 <ItemGroup> … … 152 161 </BootstrapperPackage> 153 162 </ItemGroup> 163 <ItemGroup> 164 <None Include="Properties\app.manifest" /> 165 </ItemGroup> 154 166 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 155 167 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" /> -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/ContentPipeline-{8D32B198-99B4-4D01-876D-8DF5708FA618}.xml
r5303 r5329 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\kentta1.xnb</Output> 20 <Time>2014-07-0 2T14:23:54.7042933+03:00</Time>20 <Time>2014-07-03T10:45:01.6383052+03:00</Time> 21 21 </Item> 22 22 <Item> -
2014/27/ArttuH/gamefusion/gamefusion/gamefusionContent/kentta1.txt
r5303 r5329 1 1 .....................................................................# 2 .................... z..z..z..z..z....................................#2 ...................................p.................................# 3 3 .................#####################################...............# 4 ................#....................................# ...............#4 ................#....................................##..............# 5 5 ........N.....#......................................#...............# 6 6 ##############.......................................#################
Note: See TracChangeset
for help on using the changeset viewer.