- Timestamp:
- 2017-06-14 15:02:43 (6 years ago)
- Location:
- 2017/24/LeeviE
- Files:
-
- 8 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/24/LeeviE/Peli/Jump/Jump/Jump/Jump.cs
r8652 r8675 11 11 Image pelaajankuva = LoadImage("Tyyppi peliin cropattu"); 12 12 Image platformi = LoadImage("Plat"); 13 double nopeusOikea = 200.0;14 double nopeusVasen = - 200.0;13 double nopeusOikea = 700.0; 14 double nopeusVasen = -700.0; 15 15 double hyppy = 1500.0; 16 16 … … 29 29 30 30 { 31 31 32 32 33 LuoKentta(); 33 Luolaatta(0.0, -100); 34 //Luolaatta(0.0, -100.0); 35 //Luolaatta(100.0, -200.0); 34 36 35 pelaaja = new PlatformCharacter(50.0, 50.0); 36 pelaaja.Image = pelaajankuva; 37 SmoothTextures = false; 38 39 Add(pelaaja); 37 40 38 41 39 42 40 Asetaohjaimet(); 41 42 43 43 44 44 Gravity = new Vector(0.0, -2200.0); … … 48 48 } 49 49 50 void LuoPelaaja(Vector paikka, double leveys, double korkeus) 51 { 52 pelaaja = new PlatformCharacter(50.0, 50.0); 53 pelaaja.Image = pelaajankuva; 54 SmoothTextures = false; 55 pelaaja.Position = paikka; 56 57 Add(pelaaja); 58 59 } 50 60 void Asetaohjaimet() 51 61 { … … 62 72 void LuoKentta() 63 73 { 64 PhysicsObject plat1 = new PhysicsObject(100.0, 20.0); 65 Add(plat1); 66 plat1.Image = platformi; 74 //PhysicsObject plat1 = new PhysicsObject(100.0, 20.0); 75 //Add(plat1); 76 //plat1.Image = platformi; 77 //plat1.MakeStatic(); 67 78 79 TileMap ruudut = TileMap.FromLevelAsset("kentta1"); 80 ruudut.SetTileMethod('#', LuoPalikka); 81 ruudut.SetTileMethod('*', LuoTahti); 82 ruudut.SetTileMethod('!', LuoPelaaja); 83 ruudut.Execute( 100.0, 100.0); 68 84 69 85 … … 71 87 72 88 } 89 void LuoPalikka(Vector paikka, double leveys, double korkeus) 90 { 91 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 92 taso.Position = paikka; 93 taso.Shape = Shape.Rectangle; 94 taso.Color = Color.Gray; 95 taso.CollisionIgnoreGroup = 1; 96 Add(taso); 73 97 98 99 } 100 void LuoTahti(Vector paikka, double leveys, double korkeus) 101 { 102 PhysicsObject tahti = PhysicsObject.CreateStaticObject(leveys, korkeus); 103 tahti.Position = paikka; 104 tahti.Shape = Shape.Rectangle; 105 tahti.Color = Color.Yellow; 106 Add(tahti); 107 108 109 110 111 } 74 112 void AsetaNopeus(PlatformCharacter pelaaja, double nopeus) 75 113 { … … 87 125 } 88 126 89 void Luolaatta(double x, double y)90 {91 PhysicsObject laatta1 = new PhysicsObject(1000.0, 10.0);92 laatta1.MakeStatic();93 laatta1.Y = y;94 laatta1.X = x;95 Add(laatta1);96 laatta1.Color = Color.Gray;127 //void Luolaatta(double x, double y) 128 //{ 129 // PhysicsObject laatta1 = new PhysicsObject(1000.0, 10.0); 130 // laatta1.MakeStatic(); 131 // laatta1.Y = y; 132 // laatta1.X = x; 133 // Add(laatta1); 134 // laatta1.Color = Color.Gray; 97 135 98 PhysicsObject laatta2 = new PhysicsObject(10.0, 1000.0);99 laatta2.MakeStatic();100 Add(laatta2);101 laatta2.X = 500;102 laatta2.Y = 400;103 laatta2.Color = Color.Gray;136 //PhysicsObject laatta2 = new PhysicsObject(10.0, 1000.0); 137 //laatta2.MakeStatic(); 138 //Add(laatta2); 139 //laatta2.X = 500; 140 //laatta2.Y = 400; 141 //laatta2.Color = Color.Gray; 104 142 105 PhysicsObject laatta3 = new PhysicsObject(10.0, 1000.0);106 laatta3.MakeStatic();107 Add(laatta3);108 laatta3.X = -500;109 laatta3.Y = 400;110 laatta3.Color = Color.Gray;143 //PhysicsObject laatta3 = new PhysicsObject(10.0, 1000.0); 144 //laatta3.MakeStatic(); 145 //Add(laatta3); 146 //laatta3.X = -500; 147 //laatta3.Y = 400; 148 //laatta3.Color = Color.Gray; 111 149 } 112 150 113 }151 114 152 115 153 -
2017/24/LeeviE/Peli/Jump/Jump/Jump/Jump.csproj.Debug.cachefile
r8652 r8675 2 2 Content\Tyyppi peliin cropattu.xnb 3 3 Content\Plat.xnb 4 Content\kentta1.xnb -
2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/ContentPipeline-{2750B644-1BA7-4D9C-B766-2A8DD7E77FC1}.xml
r8652 r8675 28 28 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Plat.xnb</Output> 29 29 <Time>2017-06-14T12:47:07.0101534+03:00</Time> 30 </Item> 31 <Item> 32 <Source>kentta1.txt</Source> 33 <Name>kentta1</Name> 34 <Importer>TextFileImporter</Importer> 35 <Processor>TextFileContentProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2017-06-14T14:57:06.9173888+03:00</Time> 30 39 </Item> 31 40 <BuildSuccessful>true</BuildSuccessful> -
2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/Jump.csproj.FileListAbsolute.txt
r8652 r8675 10 10 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Tyyppi peliin cropattu.xnb 11 11 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\Plat.xnb 12 C:\MyTemp\LeeviE\Peli\Jump\Jump\Jump\bin\x86\Debug\Content\kentta1.xnb -
2017/24/LeeviE/Peli/Jump/Jump/Jump/obj/x86/Debug/cachefile-{2750B644-1BA7-4D9C-B766-2A8DD7E77FC1}-targetpath.txt
r8652 r8675 2 2 Content\Tyyppi peliin cropattu.xnb 3 3 Content\Plat.xnb 4 Content\kentta1.xnb -
2017/24/LeeviE/Peli/Jump/Jump/JumpContent/JumpContent.contentproj
r8652 r8675 66 66 </Compile> 67 67 </ItemGroup> 68 <ItemGroup> 69 <Compile Include="kentta1.txt"> 70 <Name>kentta1</Name> 71 <Importer>TextFileImporter</Importer> 72 <Processor>TextFileContentProcessor</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.