Changeset 5421 for 2014/27/JesseL
- Timestamp:
- 2014-07-04 11:26:56 (8 years ago)
- Location:
- 2014/27/JesseL/Trapp
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/JesseL/Trapp/Trapp/Trapp/Trapp.cs
r5410 r5421 9 9 public class Trapp : PhysicsGame 10 10 { 11 12 const double nopeus = 1000; 11 private Image[] putous = LoadImages("lasku"); 12 13 14 const double nopeus = 700; 13 15 const double hyppyNopeus = 2075; 16 const double heittonopeus = 400; 14 17 const int RUUDUN_KOKO = 40; 15 18 … … 18 21 19 22 20 Image pelaajanKuva = LoadImage("Pelattava hahmo");23 21 24 Image tahtiKuva = LoadImage("tahti"); 22 25 … … 25 28 public override void Begin() 26 29 { 27 Gravity = new Vector(0, -1 000);30 Gravity = new Vector(0, -1500); 28 31 29 32 LuoKentta(); … … 32 35 33 36 Camera.Follow(pelaaja1); 34 Camera.ZoomFactor = 0. 9;37 Camera.ZoomFactor = 0.7; 35 38 Camera.StayInLevel = true; 36 39 SetWindowSize(1024, 768, true); 37 40 IsFullScreen = false; 38 39 } 41 SmoothTextures = false; 42 43 } 44 40 45 41 46 void LuoKentta() … … 94 99 pelaaja1.Position = paikka; 95 100 pelaaja1.Mass = 1000.0; 96 pelaaja1.Image = pelaajanKuva;101 97 102 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 98 103 Add(pelaaja1); 104 pelaaja1.AnimFall = new Animation(putous); 105 106 //pelaaja1.AnimWalk = new Animation(kavely); 99 107 100 108 //pelaaja1.Weapon = new AssaultRifle(1, 1); … … 128 136 tasoAivot.Speed = 100; 129 137 pahis.Brain = tasoAivot; 138 pahis.Tag = "vihollinen"; 139 130 140 } 131 141 void LisaaPunTaso(Vector paikka, double leveys, double korkeus) … … 137 147 138 148 } 149 void HeitaKranaatti(PlatformCharacter pelaaja) 150 { 151 Grenade kranu = new Grenade(4.0); 152 pelaaja.Throw(kranu, Angle.FromDegrees(50), 10000); 153 kranu.Explosion.ShockwaveReachesObject += KranaattiOsui; 154 kranu.Explosion.AddShockwaveHandler("vihollinen", KranaattiOsui); 155 } 156 void KranaattiOsui(IPhysicsObject rajahdyksenKohde, Vector v) 157 { 158 rajahdyksenKohde.Destroy(); 159 } 139 160 140 161 … … 147 168 Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 148 169 Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 170 Keyboard.Listen(Key.Space, ButtonState.Pressed, HeitaKranaatti, "Heittää Kranaatin", pelaaja1); 149 171 //Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", pelaaja1); 150 172 … … 173 195 { 174 196 maaliAani.Play(); 175 MessageDisplay.Add(" Keräsit tähden!");197 MessageDisplay.Add("Löytö"); 176 198 tahti.Destroy(); 177 199 } -
2014/27/JesseL/Trapp/Trapp/Trapp/Trapp.csproj.Debug.cachefile
r5370 r5421 5 5 Content\Pelattava hahmo.xnb 6 6 Content\11223344.xnb 7 Content\lasku.xnb -
2014/27/JesseL/Trapp/Trapp/Trapp/obj/x86/Debug/ContentPipeline-{656556C8-AC05-4A57-8FA6-6AA1AA386918}.xml
r5410 r5421 56 56 <Time>2014-07-04T09:37:19.0878312+03:00</Time> 57 57 </Item> 58 <Item> 59 <Source>lasku.png</Source> 60 <Name>lasku</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\JesseL\Trapp\Trapp\Trapp\bin\x86\Debug\Content\lasku.xnb</Output> 65 <Time>2014-07-04T10:46:41.3110119+03:00</Time> 66 </Item> 58 67 <BuildSuccessful>true</BuildSuccessful> 59 68 <Settings> -
2014/27/JesseL/Trapp/Trapp/Trapp/obj/x86/Debug/Trapp.csproj.FileListAbsolute.txt
r5370 r5421 13 13 C:\MyTemp\JesseL\Trapp\Trapp\Trapp\bin\x86\Debug\Content\Pelattava hahmo.xnb 14 14 C:\MyTemp\JesseL\Trapp\Trapp\Trapp\bin\x86\Debug\Content\11223344.xnb 15 C:\MyTemp\JesseL\Trapp\Trapp\Trapp\bin\x86\Debug\Content\lasku.xnb -
2014/27/JesseL/Trapp/Trapp/Trapp/obj/x86/Debug/cachefile-{656556C8-AC05-4A57-8FA6-6AA1AA386918}-targetpath.txt
r5370 r5421 5 5 Content\Pelattava hahmo.xnb 6 6 Content\11223344.xnb 7 Content\lasku.xnb -
2014/27/JesseL/Trapp/Trapp/TrappContent/TrappContent.contentproj
r5370 r5421 81 81 </Compile> 82 82 </ItemGroup> 83 <ItemGroup> 84 <Compile Include="lasku.png"> 85 <Name>lasku</Name> 86 <Importer>TextureImporter</Importer> 87 <Processor>TextureProcessor</Processor> 88 </Compile> 89 </ItemGroup> 83 90 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 84 91 <!-- 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.