- Timestamp:
- 2017-06-15 11:56:57 (6 years ago)
- Location:
- 2017/24/LeeviE
- Files:
-
- 25 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/24/LeeviE/Peli/Jump/Jump/Jump/Jump.cs
r8675 r8702 11 11 Image pelaajankuva = LoadImage("Tyyppi peliin cropattu"); 12 12 Image platformi = LoadImage("Plat"); 13 double nopeusOikea = 700.0;14 double nopeusVasen = - 700.0;13 double nopeusOikea = 600.0; 14 double nopeusVasen = -600.0; 15 15 double hyppy = 1500.0; 16 16 17 17 PlatformCharacter pelaaja; 18 19 Image groundimage = LoadImage("Laatta4"); 20 Image tausta = LoadImage("bg2"); 21 Image taahti = LoadImage("tääthi"); 22 Image vihu1 = LoadImage("Vihu"); 18 23 19 24 … … 34 39 //Luolaatta(0.0, -100.0); 35 40 //Luolaatta(100.0, -200.0); 36 37 41 42 //Level.Background.Image = tausta; 43 //Level.Background.ScaleToLevelFull = tausta; 44 45 46 47 GameObject taustakuva = new GameObject(9300.0, 2000.0); 48 taustakuva.Image = tausta; 49 Add(taustakuva, -3); 50 Layers[-3].RelativeTransition = new Vector(0.5, 0.5); 51 taustakuva.Y = 200.0; 52 53 54 55 38 56 39 57 … … 46 64 Camera.Follow(pelaaja); 47 65 66 67 PhysicsObject vihollinen = new PhysicsObject(124.0, 84.0); 68 vihollinen.Image = vihu1; 69 SmoothTextures = false; 70 Add(vihollinen); 71 72 48 73 } 74 75 76 49 77 50 78 void LuoPelaaja(Vector paikka, double leveys, double korkeus) … … 54 82 SmoothTextures = false; 55 83 pelaaja.Position = paikka; 84 AddCollisionHandler(pelaaja, "tahti", TormaaTahteen); 85 86 56 87 57 88 Add(pelaaja); 58 89 59 90 } 91 void TormaaTahteen(PhysicsObject pelaaja, PhysicsObject tahti) 92 { 93 tahti.Destroy(); 94 MessageDisplay.Add("Keräsit tähden!"); 95 } 96 60 97 void Asetaohjaimet() 61 98 { … … 87 124 88 125 } 126 127 128 89 129 void LuoPalikka(Vector paikka, double leveys, double korkeus) 90 130 { … … 94 134 taso.Color = Color.Gray; 95 135 taso.CollisionIgnoreGroup = 1; 136 taso.Image = groundimage; 137 96 138 Add(taso); 97 139 … … 100 142 void LuoTahti(Vector paikka, double leveys, double korkeus) 101 143 { 102 PhysicsObject tahti = PhysicsObject.CreateStaticObject(leveys, korkeus); 144 PhysicsObject tahti = PhysicsObject.CreateStaticObject(korkeus, leveys); 145 tahti.IgnoresCollisionResponse = true; 103 146 tahti.Position = paikka; 104 tahti.Shape = Shape.Rectangle; 105 tahti.Color = Color.Yellow; 147 //tahti.Shape = Shape.Rectangle; 148 //tahti.Color = Color.Yellow; 149 tahti.Image = taahti; 150 tahti.Tag = "tahti"; 151 106 152 Add(tahti); 107 153 -
2017/24/LeeviE/Peli/Jump/Jump/Jump/Jump.csproj.Debug.cachefile
r8675 r8702 3 3 Content\Plat.xnb 4 4 Content\kentta1.xnb 5 Content\Laatta.xnb 6 Content\Laatta2.xnb 7 Content\Laatta3.xnb 8 Content\Laatta4.xnb 9 Content\bg.xnb 10 Content\bg2.xnb 11 Content\tÀÀthi.xnb 12 Content\Vihu.xnb -
2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/ContentPipeline-{2750B644-1BA7-4D9C-B766-2A8DD7E77FC1}.xml
r8675 r8702 37 37 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta1.xnb</Output> 38 38 <Time>2017-06-14T14:57:06.9173888+03:00</Time> 39 </Item> 40 <Item> 41 <Source>Laatta.png</Source> 42 <Name>Laatta</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta.xnb</Output> 47 <Time>2017-06-15T09:55:08.4688509+03:00</Time> 48 </Item> 49 <Item> 50 <Source>Laatta2.png</Source> 51 <Name>Laatta2</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta2.xnb</Output> 56 <Time>2017-06-15T10:02:11.4845984+03:00</Time> 57 </Item> 58 <Item> 59 <Source>Laatta3.png</Source> 60 <Name>Laatta3</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta3.xnb</Output> 65 <Time>2017-06-15T10:03:29.7925874+03:00</Time> 66 </Item> 67 <Item> 68 <Source>Laatta4.png</Source> 69 <Name>Laatta4</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta4.xnb</Output> 74 <Time>2017-06-15T10:08:53.05504+03:00</Time> 75 </Item> 76 <Item> 77 <Source>bg.png</Source> 78 <Name>bg</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\bg.xnb</Output> 83 <Time>2017-06-15T10:22:50.7328509+03:00</Time> 84 </Item> 85 <Item> 86 <Source>bg2.png</Source> 87 <Name>bg2</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\bg2.xnb</Output> 92 <Time>2017-06-15T10:59:16.6160596+03:00</Time> 93 </Item> 94 <Item> 95 <Source>tääthi.png</Source> 96 <Name>tääthi</Name> 97 <Importer>TextureImporter</Importer> 98 <Processor>TextureProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\tääthi.xnb</Output> 101 <Time>2017-06-15T11:13:34.2336037+03:00</Time> 102 </Item> 103 <Item> 104 <Source>Vihu.png</Source> 105 <Name>Vihu</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Vihu.xnb</Output> 110 <Time>2017-06-15T11:43:01.1866565+03:00</Time> 39 111 </Item> 40 112 <BuildSuccessful>true</BuildSuccessful> -
2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/Jump.csproj.FileListAbsolute.txt
r8675 r8702 11 11 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Plat.xnb 12 12 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta1.xnb 13 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta.xnb 14 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta2.xnb 15 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta3.xnb 16 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Laatta4.xnb 17 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\bg.xnb 18 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\bg2.xnb 19 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\tÀÀthi.xnb 20 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Vihu.xnb -
2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/cachefile-{2750B644-1BA7-4D9C-B766-2A8DD7E77FC1}-targetpath.txt
r8675 r8702 3 3 Content\Plat.xnb 4 4 Content\kentta1.xnb 5 Content\Laatta.xnb 6 Content\Laatta2.xnb 7 Content\Laatta3.xnb 8 Content\Laatta4.xnb 9 Content\bg.xnb 10 Content\bg2.xnb 11 Content\tÀÀthi.xnb 12 Content\Vihu.xnb -
2017/24/LeeviE/Peli/Jump/Jump/JumpContent/JumpContent.contentproj
r8675 r8702 73 73 </Compile> 74 74 </ItemGroup> 75 <ItemGroup> 76 <Compile Include="Laatta.png"> 77 <Name>Laatta</Name> 78 <Importer>TextureImporter</Importer> 79 <Processor>TextureProcessor</Processor> 80 </Compile> 81 </ItemGroup> 82 <ItemGroup> 83 <Compile Include="Laatta2.png"> 84 <Name>Laatta2</Name> 85 <Importer>TextureImporter</Importer> 86 <Processor>TextureProcessor</Processor> 87 </Compile> 88 </ItemGroup> 89 <ItemGroup> 90 <Compile Include="Laatta3.png"> 91 <Name>Laatta3</Name> 92 <Importer>TextureImporter</Importer> 93 <Processor>TextureProcessor</Processor> 94 </Compile> 95 </ItemGroup> 96 <ItemGroup> 97 <Compile Include="Laatta4.png"> 98 <Name>Laatta4</Name> 99 <Importer>TextureImporter</Importer> 100 <Processor>TextureProcessor</Processor> 101 </Compile> 102 </ItemGroup> 103 <ItemGroup> 104 <Compile Include="bg.png"> 105 <Name>bg</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 </Compile> 109 </ItemGroup> 110 <ItemGroup> 111 <Compile Include="bg2.png"> 112 <Name>bg2</Name> 113 <Importer>TextureImporter</Importer> 114 <Processor>TextureProcessor</Processor> 115 </Compile> 116 </ItemGroup> 117 <ItemGroup> 118 <Compile Include="tääthi.png"> 119 <Name>tääthi</Name> 120 <Importer>TextureImporter</Importer> 121 <Processor>TextureProcessor</Processor> 122 </Compile> 123 </ItemGroup> 124 <ItemGroup> 125 <Compile Include="Vihu.png"> 126 <Name>Vihu</Name> 127 <Importer>TextureImporter</Importer> 128 <Processor>TextureProcessor</Processor> 129 </Compile> 130 </ItemGroup> 75 131 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 76 132 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2017/24/LeeviE/kentta1.txt
r8675 r8702 9 9 #.............................................*........##....#..###..#..#....#......................###.................##............##............# 10 10 #.......................#..###........#.....######.........#.........#.......#.............#..####.......#.......*..##............##................# 11 #..................###.*..............#..............................#.......#......#..##.............. *.#....####..................................#11 #..................###.*..............#..............................#.......#......#..##................#....####..................................# 12 12 #.!...........###.....................#.#............................##..................................#..........................................# 13 #.................................. *..#..............................#......*............................#..........................................#13 #.....................................#..............................#......*............................#..........................................# 14 14 ####################################################################################################################################################
Note: See TracChangeset
for help on using the changeset viewer.