Changeset 5634
- Timestamp:
- 2014-07-24 14:53:11 (8 years ago)
- Location:
- 2014/30/EevaS/Zombie attack!
- Files:
-
- 3 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/30/EevaS/Zombie attack!/Zombie attack!/Zombie attack!/Zombie_Attack!.csproj.Debug.cachefile
r5621 r5634 2 2 Content\Pelaaja.xnb 3 3 Content\Zombi.xnb 4 Content\TÀhti.xnb -
2014/30/EevaS/Zombie attack!/Zombie attack!/Zombie attack!/Zombie_attack_.cs
r5621 r5634 9 9 public class Zombie_attack_ : PhysicsGame 10 10 { 11 int pelaajanTerveys = 1; 12 13 Image tahtikuva = LoadImage("tahtikuva"); 14 Image zombikuva = LoadImage("Zombi"); 11 15 Image pelaajakuva = LoadImage("Pelaaja"); 12 16 PhysicsObject pelaaja; 17 13 18 14 19 Vector nopeusYlos = new Vector(0, 200); 15 20 Vector nopeusAlas = new Vector(0, -200); 16 21 Vector nopeusVasemmalle = new Vector(-200, 0); 17 Vector nopeusOikealle = new Vector(200, 0); 18 19 private Image tahdenkuva; 20 22 Vector nopeusOikealle = new Vector(200, 0); 21 23 22 24 … … 35 37 ruudut.SetTileMethod(Color.Gold, LuoTahti); 36 38 ruudut.SetTileMethod(Color.Red, LuoVihollinen); 37 39 38 40 ruudut.Execute(20, 20); 39 41 40 42 Camera.ZoomToLevel(); 41 43 } 42 44 43 45 void LuoPelaaja(Vector paikka, double leveys, double korkeus) 44 46 { … … 47 49 pelaaja.Image = pelaajakuva; 48 50 Add(pelaaja); 51 52 AddCollisionHandler(pelaaja, "pahis", PelaajaTuhoutuu); 53 49 54 pelaaja.CanRotate = false; 50 55 pelaaja.Restitution = 0.0; 51 56 52 57 Vector pelaajanSuunta = Vector.FromLengthAndAngle(500.0, pelaaja.Angle); 53 pelaaja.Push(pelaajanSuunta); 58 pelaaja.Push(pelaajanSuunta); 59 60 61 62 54 63 } 55 64 … … 60 69 zombi.Tag = "pahis"; 61 70 Add(zombi); 71 zombi.Image = zombikuva; 62 72 } 63 73 … … 74 84 void LuoTahti(Vector paikka, double leveys, double korkeus) 75 85 { 76 PhysicsObject tahti = PhysicsObject.CreateStaticObject( 10.0, 10.0);86 PhysicsObject tahti = PhysicsObject.CreateStaticObject(20.0, 20.0); 77 87 tahti.IgnoresCollisionResponse = true; 78 88 tahti.Position = paikka; 79 tahti.Image = tah denkuva;89 tahti.Image = tahtikuva; 80 90 tahti.Tag = "tahti"; 81 91 Add(tahti, 1); 92 AddCollisionHandler(pelaaja, KerasiTahden); 82 93 } 83 94 … … 99 110 void LiikutaPelaajaa(PhysicsObject pelaaja, Vector suunta) 100 111 { 101 pelaaja.Velocity = suunta; 112 pelaaja.Velocity = suunta; 102 113 } 114 115 void PelaajaTuhoutuu(PhysicsObject pelaaja, PhysicsObject zombi) 116 { 117 pelaajanTerveys--; 118 119 if (pelaajanTerveys <= 0) 120 pelaaja.Destroy(); 121 } 122 123 void KerasiTahden(PhysicsObject pelaaja, PhysicsObject tahti) 124 { 125 MessageDisplay.Add("Keräsit tähden"); 126 127 } 128 129 130 131 103 132 } -
2014/30/EevaS/Zombie attack!/Zombie attack!/Zombie attack!/obj/x86/Debug/ContentPipeline-{9D627D2B-285E-46FF-92A1-5D76DA271176}.xml
r5596 r5634 28 28 <Output>C:\MyTemp\EevaS\Zombie attack!\Zombie attack!\Zombie attack!\bin\x86\Debug\Content\Zombi.xnb</Output> 29 29 <Time>2014-07-23T12:45:20.5385323+03:00</Time> 30 </Item> 31 <Item> 32 <Source>Tähti.png</Source> 33 <Name>Tähti</Name> 34 <Importer>TextureImporter</Importer> 35 <Processor>TextureProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\EevaS\Zombie attack!\Zombie attack!\Zombie attack!\bin\x86\Debug\Content\Tähti.xnb</Output> 38 <Time>2014-07-24T14:25:24.5389801+03:00</Time> 30 39 </Item> 31 40 <BuildSuccessful>true</BuildSuccessful> -
2014/30/EevaS/Zombie attack!/Zombie attack!/Zombie attack!/obj/x86/Debug/Zombie_Attack!.csproj.FileListAbsolute.txt
r5621 r5634 9 9 C:\MyTemp\EevaS\Zombie attack!\Zombie attack!\Zombie attack!\obj\x86\Debug\Zombie attack!.exe 10 10 C:\MyTemp\EevaS\Zombie attack!\Zombie attack!\Zombie attack!\obj\x86\Debug\Zombie attack!.pdb 11 C:\MyTemp\EevaS\Zombie attack!\Zombie attack!\Zombie attack!\obj\x86\Debug\Zombie_Attack!.csprojResolveAssemblyReference.cache 12 C:\MyTemp\EevaS\Zombie attack!\Zombie attack!\Zombie attack!\bin\x86\Debug\Content\TÀhti.xnb -
2014/30/EevaS/Zombie attack!/Zombie attack!/Zombie attack!/obj/x86/Debug/cachefile-{9D627D2B-285E-46FF-92A1-5D76DA271176}-targetpath.txt
r5596 r5634 2 2 Content\Pelaaja.xnb 3 3 Content\Zombi.xnb 4 Content\TÀhti.xnb -
2014/30/EevaS/Zombie attack!/Zombie attack!/Zombie attack!Content/Zombie attack!Content.contentproj
r5596 r5634 66 66 </Compile> 67 67 </ItemGroup> 68 <ItemGroup> 69 <Compile Include="Tähti.png"> 70 <Name>Tähti</Name> 71 <Importer>TextureImporter</Importer> 72 <Processor>TextureProcessor</Processor> 73 </Compile> 74 </ItemGroup> 68 75 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 69 76 <!-- 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.