Changeset 8700
- Timestamp:
- 2017-06-15 11:55:19 (4 years ago)
- Location:
- 2017/24/TomiK/AvaruusTaistelu
- Files:
-
- 12 added
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/24/TomiK/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu.cs
r8665 r8700 10 10 { 11 11 12 13 LaserGun aluksenase;12 13 // LaserGun aluksenase; 14 14 PhysicsObject uuni; 15 15 PhysicsObject vihollinen; 16 16 Image Uunikuva = LoadImage("Uuni"); 17 Image Vihollinenkuva = LoadImage("Vihollinen ");17 Image Vihollinenkuva = LoadImage("Vihollinen2"); 18 18 Image Asteroidkuva = LoadImage("Asteroidi"); 19 Image Rakettikuva = LoadImage("Raketti ");19 Image Rakettikuva = LoadImage("Raketti2"); 20 20 PhysicsObject asteroid; 21 21 Vector nopeusYlos = new Vector(0, 200); … … 26 26 public override void Begin() 27 27 { 28 Level.CreateBorders(); 29 28 29 30 30 Mouse.IsCursorVisible = true; 31 32 alus = new PhysicsObject( 40.0, 60.0);31 32 alus = new PhysicsObject(60.0, 40.0); 33 33 Add(alus); 34 34 alus.Image = Rakettikuva; 35 35 Camera.Follow(alus); 36 36 37 vihollinen = new PhysicsObject(40.0, 60.0); 38 Add(vihollinen); 39 vihollinen.Image = Vihollinenkuva; 37 40 38 41 39 SmoothTextures = false; … … 54 52 Add(asteroid); 55 53 54 55 56 56 57 57 LaserGun laserase = new LaserGun(20, 5); 58 58 59 59 //Keyboard.Listen(Key.Space, ButtonState.Down, ammuasella, "Ammu", alus); 60 60 61 61 62 62 … … 66 66 // Gravity = new Vector(0.0, -500.0); 67 67 68 69 Level.Background.Color = Color.Blue; 68 Image tausta = LoadImage("taustakuva"); 69 Level.Background.Image = tausta; 70 Level.Background.Height = 2460; 71 Level.Background.Width = 5160; 70 72 71 73 ohjaimet(); 74 Vihollinen(); 75 LuoKentta(); 72 76 73 74 77 Mouse.ListenMovement(0.1, Tahtaa, "tahtaa aseella"); 78 79 } 80 81 void Tahtaa(AnalogState hiirenLiike) 82 { 83 Vector suunta = (Mouse.PositionOnWorld - alus.AbsolutePosition).Normalize(); 84 alus.Angle = suunta.Angle; 85 } 86 87 void LuoKentta() 88 { 89 TileMap ruudut = TileMap.FromLevelAsset("kentta1"); 90 91 ruudut.SetTileMethod('#', LuoPalikka); 92 //ruudut.SetTileMethod('*', LuoTahti); 93 ruudut.Execute(20, 20); 94 } 75 95 76 96 77 97 98 void LuoPalikka(Vector paikka, double leveys, double korkeus) 99 { 100 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 101 taso.Position = paikka; 102 103 Add(taso); 104 105 } 106 107 void Vihollinen() 108 { 109 vihollinen = new PhysicsObject(60.0, 40.0); 110 Add(vihollinen); 111 vihollinen.Image = Vihollinenkuva; 78 112 79 113 80 81 114 } 82 115 83 116 void ohjaimet() 84 117 { 85 118 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); -
2017/24/TomiK/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu.csproj.Debug.cachefile
r8665 r8700 3 3 Content\Vihollinen.xnb 4 4 Content\Uuni.xnb 5 Content\New Text Document.xnb 5 Content\kentta1.xnb 6 Content\Raketti2.xnb 7 Content\Vihollinen2.xnb 8 Content\4865_thumb.xnb 9 Content\taustakuva.xnb 10 Content\Raketti.png -
2017/24/TomiK/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu/obj/x86/Debug/AvaruusTaistelu.csproj.FileListAbsolute.txt
r8665 r8700 11 11 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Vihollinen.xnb 12 12 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Uuni.xnb 13 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\New Text Document.xnb 13 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\kentta1.xnb 14 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Raketti2.xnb 15 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Raketti.png 16 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Vihollinen2.xnb 17 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\4865_thumb.xnb 18 C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\taustakuva.xnb -
2017/24/TomiK/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu/obj/x86/Debug/ContentPipeline-{894A147D-5CBB-43F5-B784-FF655CB6A429}.xml
r8665 r8700 39 39 </Item> 40 40 <Item> 41 <Source> New Text Document.txt</Source>42 <Name> New Text Document</Name>41 <Source>kentta1.txt</Source> 42 <Name>kentta1</Name> 43 43 <Importer>TextFileImporter</Importer> 44 44 <Processor>TextFileContentProcessor</Processor> 45 45 <Options>None</Options> 46 <Output>C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\New Text Document.xnb</Output> 47 <Time>2017-06-14T14:00:16.45382+03:00</Time> 46 <Output>C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\kentta1.xnb</Output> 47 <Time>2017-06-15T11:04:54.1821851+03:00</Time> 48 </Item> 49 <Item> 50 <Source>Raketti2.png</Source> 51 <Name>Raketti2</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Raketti2.xnb</Output> 56 <Time>2017-06-15T10:55:12.0920579+03:00</Time> 57 </Item> 58 <Item> 59 <Source>Vihollinen2.png</Source> 60 <Name>Vihollinen2</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\Vihollinen2.xnb</Output> 65 <Time>2017-06-15T11:01:14.6765494+03:00</Time> 66 </Item> 67 <Item> 68 <Source>4865_thumb.jpg</Source> 69 <Name>4865_thumb</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\4865_thumb.xnb</Output> 74 <Time>2017-06-15T11:19:18.5477155+03:00</Time> 75 </Item> 76 <Item> 77 <Source>taustakuva.jpg</Source> 78 <Name>taustakuva</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\TomiK\AvaruusTaistelu\AvaruusTaistelu\AvaruusTaistelu\bin\x86\Debug\Content\taustakuva.xnb</Output> 83 <Time>2017-06-15T11:32:00.7844964+03:00</Time> 48 84 </Item> 49 85 <BuildSuccessful>true</BuildSuccessful> -
2017/24/TomiK/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaistelu/obj/x86/Debug/cachefile-{894A147D-5CBB-43F5-B784-FF655CB6A429}-targetpath.txt
r8665 r8700 3 3 Content\Vihollinen.xnb 4 4 Content\Uuni.xnb 5 Content\New Text Document.xnb 5 Content\kentta1.xnb 6 Content\Raketti2.xnb 7 Content\Vihollinen2.xnb 8 Content\4865_thumb.xnb 9 Content\taustakuva.xnb 10 Content\Raketti.png -
2017/24/TomiK/AvaruusTaistelu/AvaruusTaistelu/AvaruusTaisteluContent/AvaruusTaisteluContent.contentproj
r8665 r8700 50 50 <Importer>TextureImporter</Importer> 51 51 <Processor>TextureProcessor</Processor> 52 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 52 53 </Compile> 53 54 </ItemGroup> … … 74 75 </ItemGroup> 75 76 <ItemGroup> 76 <Compile Include=" New Text Document.txt">77 <Name> New Text Document</Name>77 <Compile Include="kentta1.txt"> 78 <Name>kentta1</Name> 78 79 <Importer>TextFileImporter</Importer> 79 80 <Processor>TextFileContentProcessor</Processor> 81 </Compile> 82 </ItemGroup> 83 <ItemGroup> 84 <Compile Include="Raketti2.png"> 85 <Name>Raketti2</Name> 86 <Importer>TextureImporter</Importer> 87 <Processor>TextureProcessor</Processor> 88 </Compile> 89 </ItemGroup> 90 <ItemGroup> 91 <Compile Include="Vihollinen2.png"> 92 <Name>Vihollinen2</Name> 93 <Importer>TextureImporter</Importer> 94 <Processor>TextureProcessor</Processor> 95 </Compile> 96 </ItemGroup> 97 <ItemGroup> 98 <Compile Include="4865_thumb.jpg"> 99 <Name>4865_thumb</Name> 100 <Importer>TextureImporter</Importer> 101 <Processor>TextureProcessor</Processor> 102 </Compile> 103 </ItemGroup> 104 <ItemGroup> 105 <Compile Include="taustakuva.jpg"> 106 <Name>taustakuva</Name> 107 <Importer>TextureImporter</Importer> 108 <Processor>TextureProcessor</Processor> 80 109 </Compile> 81 110 </ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.