Changeset 8623 for 2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey
- Timestamp:
- 2017-06-14 10:13:05 (6 years ago)
- Location:
- 2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey/TheLegendOfSpikey/TheLegendOfSpikey.cs
r8536 r8623 13 13 const int RUUDUN_KOKO = 40; 14 14 15 PlatformCharacter pelaaja1; 15 PlatformCharacter pelaaja1; 16 16 17 17 Image pelaajanKuva = LoadImage("norsu"); … … 26 26 LuoKentta(); 27 27 LisaaNappaimet(); 28 28 LisaaTaso(100.0, 0.0); 29 LisaaTaso(-100.0, 0.0); 30 LisaaTaso(0.0, 100.0); 31 LisaaTaso(200.0, 0.0); 32 LisaaTaso(0.0, -100.0); 33 LisaaTaso(-200.0, 0.0); 34 LisaaTaso(0.0, 200.0); 35 LisaaTaso(0.0, -200.0); 36 LisaaTaso(300, 0.0); 37 LisaaTaso(-300, 0.0); 38 LisaaTaso(0.0, 300.0); 39 LisaaTaso(0.0, -300.0); 40 LisaaTaso(400, 0.0); 41 LisaaTaso(-400, 0.0); 42 LisaaTaso(0.0, 400); 43 LisaaTaso(0.0, -400); 44 LisaaTaso(100.0, 100.0); 45 LisaaTaso(200.0, 200.0); 46 LisaaTaso(300.0, 300.0); 47 LisaaTaso(400.0, 400.0); 48 LisaaTaso(-100.0, 100.0); 49 LisaaTaso(-200.0, 200.0); 50 LisaaTaso(-300.0, 300.0); 51 LisaaTaso(-400.0, 400.0); 29 52 Camera.Follow(pelaaja1); 30 53 Camera.ZoomFactor = 1.2; … … 35 58 { 36 59 TileMap kentta = TileMap.FromLevelAsset("kentta1"); 37 kentta.SetTileMethod('#', LisaaTaso);38 kentta.SetTileMethod('*', LisaaTahti);39 kentta.SetTileMethod('N', LisaaPelaaja);40 60 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 41 61 Level.CreateBorders(); … … 43 63 } 44 64 45 void LisaaTaso(Vector paikka, double leveys, double korkeus)46 {47 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus);48 taso.Position = paikka;49 taso.Color = Color.Gray;50 Add(taso);51 }52 65 53 void LisaaTahti(Vector paikka, double leveys, double korkeus) 54 { 55 PhysicsObject tahti = PhysicsObject.CreateStaticObject(leveys, korkeus); 56 tahti.IgnoresCollisionResponse = true; 57 tahti.Position = paikka; 58 tahti.Image = tahtiKuva; 59 tahti.Tag = "tahti"; 60 Add(tahti); 61 } 66 67 62 68 63 69 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 64 70 { 65 71 pelaaja1 = new PlatformCharacter(leveys, korkeus); 66 pelaaja1.Position = paikka;67 72 pelaaja1.Mass = 4.0; 68 73 pelaaja1.Image = pelaajanKuva; 69 74 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 75 pelaaja1. X = 0.0; 76 pelaaja1. Y = 100.0; 70 77 Add(pelaaja1); 71 78 } … … 91 98 void Liikuta(PlatformCharacter hahmo, double nopeus) 92 99 { 93 hahmo.Walk(nopeus); 100 94 101 } 95 102 96 103 void Hyppaa(PlatformCharacter hahmo, double nopeus) 97 104 { 98 hahmo.Jump(nopeus); 105 99 106 } 100 107 … … 105 112 tahti.Destroy(); 106 113 } 114 115 116 void LisaaTaso(double x, double y) 117 { 118 PhysicsObject taso = PhysicsObject.CreateStaticObject(80.0, 20.0); 119 taso.Shape = Shape.Rectangle; 120 taso.X = x; 121 taso.Y = y; 122 taso.Color = Color.DarkForestGreen; 123 Add(taso); 124 } 125 126 127 107 128 } -
2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey/TheLegendOfSpikey/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r8536 r8623 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\maali.xnb</Output> 11 <Time>2017-06-1 2T14:42:27.0329646+03:00</Time>11 <Time>2017-06-13T10:27:53.0026763+03:00</Time> 12 12 </Item> 13 13 <Item> … … 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\norsu.xnb</Output> 20 <Time>2017-06-1 2T14:54:22.5464556+03:00</Time>20 <Time>2017-06-13T13:05:31.2193166+03:00</Time> 21 21 </Item> 22 22 <Item> … … 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\tahti.xnb</Output> 29 <Time>2017-06-1 2T14:58:01.9789165+03:00</Time>29 <Time>2017-06-13T13:05:31.2818252+03:00</Time> 30 30 </Item> 31 31 <Item> … … 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2017-06-1 2T14:42:27.0329646+03:00</Time>38 <Time>2017-06-13T10:27:53.0086092+03:00</Time> 39 39 </Item> 40 40 <BuildSuccessful>true</BuildSuccessful> … … 85 85 <Assembly> 86 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> 87 <Value>2017-06-08T1 3:26:33.8923001+03:00</Value>87 <Value>2017-06-08T18:20:14.6175359+03:00</Value> 88 88 </Assembly> 89 89 </Assemblies>
Note: See TracChangeset
for help on using the changeset viewer.