Changeset 6987
- Timestamp:
- 2015-07-23 14:59:22 (8 years ago)
- Location:
- 2015/30/JenniN
- Files:
-
- 11 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli.cs
r6930 r6987 19 19 //Image tahtiKuva = LoadImage("tahti"); 20 20 21 Image hahmonKuva = LoadImage(" hahmonsuunnitelma");21 Image hahmonKuva = LoadImage("Uusihahmo"); 22 22 Image pahiksenKuva = LoadImage("pahis"); 23 Image taustaKuva = LoadImage("tautakuva"); 24 Image maalinKuva = LoadImage("KuvaM"); 25 Image Savu = LoadImage("sydänsavu"); 23 26 24 27 … … 41 44 42 45 43 46 Level.Background.Image = taustaKuva; 47 44 48 Camera.Follow(pelaaja1); 45 Camera.ZoomFactor = 4;49 Camera.ZoomFactor = 5; 46 50 Camera.StayInLevel = true; 47 51 … … 57 61 kentta.SetTileMethod('N', LisaaPelaaja); 58 62 kentta.SetTileMethod('K', LisaaEste); 63 kentta.SetTileMethod('E', LisaaSiirtojuttu); 64 kentta.SetTileMethod('M', LisaaMaali); 65 kentta.SetTileMethod('U', Lisaakukka); 59 66 60 67 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); … … 74 81 } 75 82 76 77 78 83 84 85 void LisaaSiirtojuttu(Vector paikka, double leveys, double korkeus) 86 { 87 PhysicsObject siirtojuttu = new PhysicsObject(leveys, korkeus); 88 siirtojuttu.Position = paikka; 89 siirtojuttu.Color = Color.HotPink; 90 siirtojuttu.Mass = 7.0; 91 Add(siirtojuttu); 92 } 93 94 void LisaaMaali(Vector paikka, double leveys, double korkeus) 95 { 96 PhysicsObject maali = PhysicsObject.CreateStaticObject(leveys, korkeus); 97 maali.IgnoresCollisionResponse = true; 98 maali.Position = paikka; 99 maali.Image = maalinKuva; 100 maali.Tag = "maali"; 101 Add(maali); 102 } 79 103 80 104 … … 91 115 } 92 116 117 void Lisaakukka(Vector paikka, double leveys, double korkeus) 118 { 119 PhysicsObject kukka = PhysicsObject.CreateStaticObject(leveys, korkeus); 120 121 kukka.Position = paikka; 122 kukka.Shape = Shape.Heart; 123 kukka.Color = RandomGen.NextColor(); 124 kukka.Tag = "kukka"; 125 Add(kukka); 126 } 127 93 128 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 94 129 { 95 130 pelaaja1 = new PlatformCharacter(leveys, korkeus); 96 131 pelaaja1.Position = paikka; 97 pelaaja1.Mass = 4.0;132 pelaaja1.Mass = 8.0; 98 133 pelaaja1.Image = hahmonKuva; 99 134 pelaaja1.Tag = "pelaaja"; 100 135 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 101 136 AddCollisionHandler(pelaaja1, "este", TormaaEsteeseen); 102 137 AddCollisionHandler(pelaaja1, "maali", MaaliinTulo); 138 AddCollisionHandler(pelaaja1, "kukka", TormaaKukkaan); 103 139 Add(pelaaja1); 104 140 } 105 141 106 142 void TormaaKukkaan(PhysicsObject hahmo, PhysicsObject kukka) 143 { 144 Flame liekki = new Flame(Savu); 145 liekki.Position = kukka.Position; 146 Timer.SingleShot(1.0, delegate { liekki.Destroy(); }); 147 Add(liekki); 148 149 } 150 151 void MaaliinTulo(PhysicsObject hahmo, PhysicsObject maali) 152 { 153 Flame liekki = new Flame(hahmonKuva); 154 liekki.Position = hahmo.Position; 155 Add(liekki); 156 Timer.SingleShot(1.0, delegate { hahmo.Destroy(); }); 157 158 159 Label tekstikentta = new Label(200.0, 100.0, "MAALI!"); 160 tekstikentta.Font = Font.DefaultLarge; 161 tekstikentta.Color = Color.Aqua; 162 tekstikentta.TextColor = Color.Red; 163 tekstikentta.BorderColor = Color.Black; 164 Add(tekstikentta); 165 166 } 107 167 108 168 … … 117 177 118 178 esteenAse.Ammo.Value = 100; 119 esteenAse.FireRate = 0.5;120 esteenAse.X = 55.0;179 esteenAse.FireRate = 10; 180 esteenAse.X = 30.0; 121 181 esteenAse.Y = -5.0; 122 182 … … 124 184 este.Add(esteenAse); 125 185 Add(este); 186 187 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 188 tasoAivot.Speed = 50; 189 este.Brain = tasoAivot; 126 190 127 191 Timer ajastin = new Timer(); -
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli.csproj.Debug.cachefile
r6930 r6987 7 7 Content\pahis.xnb 8 8 Content\ruoka.xnb 9 Content\Uusihahmo.xnb 10 Content\UusihahmokÀvelee.xnb 11 Content\tautakuva.xnb 12 Content\KuvaM.xnb 13 Content\sydÀnsavu.xnb -
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/obj/x86/Debug/Karkuunomapeli.csproj.FileListAbsolute.txt
r6930 r6987 15 15 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\pahis.xnb 16 16 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\ruoka.xnb 17 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\Uusihahmo.xnb 18 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\UusihahmokÀvelee.xnb 19 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\tautakuva.xnb 20 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\KuvaM.xnb 21 C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\sydÀnsavu.xnb -
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/obj/x86/Debug/cachefile-{935D6C79-42D8-4967-8F2D-48E6CFE7CE27}-targetpath.txt
r6930 r6987 7 7 Content\pahis.xnb 8 8 Content\ruoka.xnb 9 Content\Uusihahmo.xnb 10 Content\UusihahmokÀvelee.xnb 11 Content\tautakuva.xnb 12 Content\KuvaM.xnb 13 Content\sydÀnsavu.xnb -
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/KarkuunomapeliContent/KarkuunomapeliContent.contentproj
r6930 r6987 84 84 </ItemGroup> 85 85 <ItemGroup> 86 <Compile Include="ruoka.png"> 87 <Name>ruoka</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 </Compile> 91 </ItemGroup> 92 <ItemGroup> 93 <Compile Include="Uusihahmokävelee.png"> 94 <Name>Uusihahmokävelee</Name> 95 <Importer>TextureImporter</Importer> 96 <Processor>TextureProcessor</Processor> 97 </Compile> 98 </ItemGroup> 99 <ItemGroup> 100 <Compile Include="Uusihahmo.png"> 101 <Name>Uusihahmo</Name> 102 <Importer>TextureImporter</Importer> 103 <Processor>TextureProcessor</Processor> 104 </Compile> 105 </ItemGroup> 106 <ItemGroup> 86 107 <Compile Include="pahis.png"> 87 108 <Name>pahis</Name> … … 91 112 </ItemGroup> 92 113 <ItemGroup> 93 <Compile Include="ruoka.png"> 94 <Name>ruoka</Name> 114 <Compile Include="tautakuva.png"> 115 <Name>tautakuva</Name> 116 <Importer>TextureImporter</Importer> 117 <Processor>TextureProcessor</Processor> 118 </Compile> 119 </ItemGroup> 120 <ItemGroup> 121 <Compile Include="KuvaM.png"> 122 <Name>KuvaM</Name> 123 <Importer>TextureImporter</Importer> 124 <Processor>TextureProcessor</Processor> 125 </Compile> 126 </ItemGroup> 127 <ItemGroup> 128 <Compile Include="sydänsavu.png"> 129 <Name>sydänsavu</Name> 95 130 <Importer>TextureImporter</Importer> 96 131 <Processor>TextureProcessor</Processor> -
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/KarkuunomapeliContent/kentta1.txt
r6930 r6987 1 .......................................*...........#..........2 .......................#...*......... ###...###.....######.....3 *...*....######....##########......####...##*##....#... .....##4 #...######....#...*#...#....K............# #.......K#...#.*..#*5 #K.......##...######...#.....###.......*##K.....####...#### ##.6 #### #.....#............#..........*....##..###.......*........7 *...##...##.......#*...#K..*.....###...###..........########## 8 ##... ....#......#####..#####...........##..............#*.....9 ..#.########...........#....####...###.#####*...###########... 10 ...#..........### ##....#...................######......#.....K11 ...........*...........#........###......#............. ....###12 ...........##........*. .................*..........#####......13 .........##..#.......###.....###.......# ##........#....#......14 N.......## ..K....#####.......*....##########...K...*...#..####15 ############################################################## 16 ############################################################## 1 ############U..........E...............*....E......U*.............E......*............*.......#.........E.......*.... 2 .......................#...*.........U##...###.....######.......####...####U..........*.......E.........#...#U####### 3 *...*....######....##########......####...##*##....#...E....##....#.............K.....#....#.##....##..UU........K..* 4 #...######....#...*#...#....K............#U.......KU...#.*..#*..###.......*...####.......#...#K.##......K..##...##.## 5 #K.......##...######...#.....###.......*##K.....####...####U#####.......#U##...#....#U#.......K...E.....U#........... 6 ####U.....U............#..........*....##..###.......*.K............###........E..............K..*##**..K.......K#UUU 7 *...##...##.......#*...#K..*.....###...###..........##########.....E..K........###U######U##U########UUU#***#UUU##### 8 ##...E...#......#####..#####...........##..............#*.........######....###.....*...........*..#K...**U**....***# 9 ..#.########...........#....####...###.#####*...###########........*#......*......##U#.....###U....#K..**...***....*# 10 ...#..........###U#....#...................######......#.....K..#####.....###.........U...##.......#..***#U#.***...*# 11 ...........*...........#........###......#.............E...###......#..........#U#K..............*.#.*#.*****.***...# 12 ...........##........*.E................*E.........#####....##U....*#......*.....##.....U##......#.#..####.########## 13 .........##..#.......###.....###.......#U#.............#.....*##....#....#####....U##..........#...##****#....***..MM 14 N.......##K......U####.......*....##########K......*...#..####K.....E....K.........*##....####..K..#*****#....***..MM 15 ##################################################################################################################### 16 ##################################################################################################################### -
2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/KarkuunomapeliContent/obj/x86/Debug/ContentPipeline.xml
r6930 r6987 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2015-07-2 2T14:09:03.856523+03:00</Time>38 <Time>2015-07-23T14:58:55.2301835+03:00</Time> 39 39 </Item> 40 40 <Item> … … 63 63 <Options>None</Options> 64 64 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\pahis.xnb</Output> 65 <Time>2015-07-2 2T10:38:45.3544282+03:00</Time>65 <Time>2015-07-23T11:38:42.7658114+03:00</Time> 66 66 </Item> 67 67 <Item> … … 73 73 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\ruoka.xnb</Output> 74 74 <Time>2015-07-22T10:46:25.2000282+03:00</Time> 75 </Item> 76 <Item> 77 <Source>Uusihahmo.png</Source> 78 <Name>Uusihahmo</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\Uusihahmo.xnb</Output> 83 <Time>2015-07-23T11:00:12.3882667+03:00</Time> 84 </Item> 85 <Item> 86 <Source>Uusihahmokävelee.png</Source> 87 <Name>Uusihahmokävelee</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\Uusihahmokävelee.xnb</Output> 92 <Time>2015-07-23T09:58:05.0976667+03:00</Time> 93 </Item> 94 <Item> 95 <Source>tautakuva.png</Source> 96 <Name>tautakuva</Name> 97 <Importer>TextureImporter</Importer> 98 <Processor>TextureProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\tautakuva.xnb</Output> 101 <Time>2015-07-23T12:43:39.0395835+03:00</Time> 102 </Item> 103 <Item> 104 <Source>KuvaM.png</Source> 105 <Name>KuvaM</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\KuvaM.xnb</Output> 110 <Time>2015-07-23T14:08:06.7921835+03:00</Time> 111 </Item> 112 <Item> 113 <Source>sydänsavu.png</Source> 114 <Name>sydänsavu</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\sydänsavu.xnb</Output> 119 <Time>2015-07-23T14:57:41.6347835+03:00</Time> 75 120 </Item> 76 121 <BuildSuccessful>true</BuildSuccessful>
Note: See TracChangeset
for help on using the changeset viewer.