Changeset 5847 for 2014/koodauskerho
- Timestamp:
- 2015-05-16 15:03:45 (8 years ago)
- Location:
- 2014/koodauskerho/38/santeriS/TankBattele
- Files:
-
- 11 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/koodauskerho/38/santeriS/TankBattele/TankBattele/TankBattele/TankBattele.cs
r5826 r5847 9 9 public class TankBattele : PhysicsGame 10 10 { 11 Image tankki1kuva = LoadImage("tankki1"); 12 Image tankki2kuva = LoadImage("tankki2"); 13 Image tankki3kuva = LoadImage("tankki3"); 14 Image tankki4kuva = LoadImage("tankki4"); 15 PhysicsObject tankki1, tankki2, tankki3, tankki4; 16 11 17 public override void Begin() 12 18 { 13 19 // TODO: Kirjoita ohjelmakoodisi tähän 20 Gravity = new Vector(0, -1000); 14 21 15 22 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 16 23 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 24 //Level.Height = Screen.Height; 25 Level.Width = Screen.Width; 26 IsFullScreen = true; 27 LuoMaa(); 28 tankki1 = Luotankki(new Vector(-600, -200), tankki1kuva); 29 tankki2 = Luotankki(new Vector(-300, -200), tankki2kuva); 30 tankki3 = Luotankki(new Vector(300, -200), tankki3kuva); 31 tankki4 = Luotankki(new Vector(600, -200), tankki4kuva); 17 32 } 18 void LuoMaa 33 34 void LuoMaa() 19 35 { 20 Sur 21 face alaReuna = Surface.CreateBottom(Level, 30, 100, 40); 36 //Surface alaReuna = Surface.CreateBottom(Level, 30,180,20,100); 37 Surface alaReuna = Surface.CreateBottom(Level, 200, 400, 30, 100); 38 alaReuna.Y += 150; 39 Add(alaReuna); 40 } 22 41 23 Add(alaReuna); 42 PhysicsObject Luotankki(Vector paikka, Image kuva) 43 { 44 PhysicsObject tankki = new PhysicsObject(40, 20); 45 tankki.Shape = Shape.Rectangle; 46 tankki.Color = Color.Black; 47 tankki.Mass = 10; 48 tankki.Position = paikka; 49 tankki.Image = kuva; 50 //tankki.CanRotate = false; 51 tankki.AngularDamping = 0.1; 52 tankki.Restitution = 0.0; 53 Add(tankki); 54 55 Cannon tykki = new Cannon(20, 5); 56 tykki.InfiniteAmmo = true; 57 tykki.ProjectileCollision = AmmusOsui; 58 tankki.Add(tykki); 59 tykki.X = 8.0; 60 tykki.Y = 0.0; 61 62 return tankki; 63 /*AssaultRifle ase = new AssaultRifle(30, 10); 64 ase.InfiniteAmmo = true; 65 ase.ProjectileCollision = AmmusOsui; 66 tankki.Add(ase);*/ 67 } 68 69 void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 70 { 71 ammus.Destroy(); 72 } 73 74 void luoNappaimet() 75 { 76 Keyboard.Listen(Key.Left, ButtonState.Pressed, kaannaTykkia,"käännä tykkiä", tankki1, 20.0); 77 } 78 79 void kaannaTykkia(PhysicsObject tankki, double speed) 80 { 81 24 82 } 25 83 } -
2014/koodauskerho/38/santeriS/TankBattele/TankBattele/TankBattele/obj/x86/Debug/ContentPipeline-{0476DB2D-AA78-40AF-A6DC-C16F18502CA7}.xml
r5826 r5847 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>tankki1.png</Source> 6 <Name>tankki1</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki1.xnb</Output> 11 <Time>2015-05-16T13:56:11.8044957+03:00</Time> 12 </Item> 13 <Item> 14 <Source>tankki2.png</Source> 15 <Name>tankki2</Name> 16 <Importer>TextureImporter</Importer> 17 <Processor>TextureProcessor</Processor> 18 <Options>None</Options> 19 <Output>C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki2.xnb</Output> 20 <Time>2015-05-16T13:56:23.1059739+03:00</Time> 21 </Item> 22 <Item> 23 <Source>tankki3.png</Source> 24 <Name>tankki3</Name> 25 <Importer>TextureImporter</Importer> 26 <Processor>TextureProcessor</Processor> 27 <Options>None</Options> 28 <Output>C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki3.xnb</Output> 29 <Time>2015-05-16T13:56:35.1007432+03:00</Time> 30 </Item> 31 <Item> 32 <Source>tankki4.png</Source> 33 <Name>tankki4</Name> 34 <Importer>TextureImporter</Importer> 35 <Processor>TextureProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki4.xnb</Output> 38 <Time>2015-05-16T14:37:50.0709198+03:00</Time> 39 </Item> 4 40 <BuildSuccessful>true</BuildSuccessful> 5 41 <Settings> … … 16 52 <Assemblies> 17 53 <Assembly> 54 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 55 <Value>2014-11-26T00:23:34+02:00</Value> 56 </Assembly> 57 <Assembly> 58 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 59 <Value>2011-09-01T16:22:30+03:00</Value> 60 </Assembly> 61 <Assembly> 62 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 63 <Value>2011-09-01T16:22:30+03:00</Value> 64 </Assembly> 65 <Assembly> 66 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 67 <Value>2011-09-01T16:22:30+03:00</Value> 68 </Assembly> 69 <Assembly> 70 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 71 <Value>2011-09-01T16:22:30+03:00</Value> 72 </Assembly> 73 <Assembly> 74 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 75 <Value>2011-09-01T16:22:30+03:00</Value> 76 </Assembly> 77 <Assembly> 78 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 79 <Value>2011-09-01T16:22:30+03:00</Value> 80 </Assembly> 81 <Assembly> 82 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 83 <Value>2014-11-26T00:23:36+02:00</Value> 84 </Assembly> 85 <Assembly> 18 86 <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 19 <Value>201 4-04-23T00:53:38.0521963+03:00</Value>87 <Value>2012-07-09T09:25:46.7449733+03:00</Value> 20 88 </Assembly> 21 89 </Assemblies> -
2014/koodauskerho/38/santeriS/TankBattele/TankBattele/TankBattele/obj/x86/Debug/TankBattele.csproj.FileListAbsolute.txt
r5826 r5847 7 7 C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\obj\x86\Debug\TankBattele.exe 8 8 C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\obj\x86\Debug\TankBattele.pdb 9 C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki1.xnb 10 C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki2.xnb 11 C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki3.xnb 12 C:\MyTemp\santeriS\TankBattele\TankBattele\TankBattele\bin\x86\Debug\Content\tankki4.xnb -
2014/koodauskerho/38/santeriS/TankBattele/TankBattele/TankBatteleContent/TankBatteleContent.contentproj
r5826 r5847 45 45 <Reference Include="AnimationExtension" /> 46 46 </ItemGroup> 47 <ItemGroup> 48 <Compile Include="tankki1.png"> 49 <Name>tankki1</Name> 50 <Importer>TextureImporter</Importer> 51 <Processor>TextureProcessor</Processor> 52 </Compile> 53 </ItemGroup> 54 <ItemGroup> 55 <Compile Include="tankki2.png"> 56 <Name>tankki2</Name> 57 <Importer>TextureImporter</Importer> 58 <Processor>TextureProcessor</Processor> 59 </Compile> 60 <Compile Include="tankki3.png"> 61 <Name>tankki3</Name> 62 <Importer>TextureImporter</Importer> 63 <Processor>TextureProcessor</Processor> 64 </Compile> 65 <Compile Include="tankki4.png"> 66 <Name>tankki4</Name> 67 <Importer>TextureImporter</Importer> 68 <Processor>TextureProcessor</Processor> 69 </Compile> 70 </ItemGroup> 47 71 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 48 72 <!-- 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.