Changeset 5846
- Timestamp:
- 2015-05-16 15:02:03 (8 years ago)
- Location:
- 2014/koodauskerho/38/OttoR
- Files:
-
- 35 added
- 13 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last Light/Last Light.csproj.Debug.cachefile
r5835 r5846 15 15 Content\puukko.xnb 16 16 Content\puukotus.xnb 17 Content\laatikko.xnb 18 Content\alien.xnb -
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last Light/Last_Light.cs
r5835 r5846 31 31 Image zombikuva = LoadImage("zombi"); 32 32 Image puukkokuva = LoadImage("puukko"); 33 Image laatikkokuva = LoadImage("laatikko"); 34 Image alienkuva = LoadImage("alien"); 33 35 PhysicsObject puukko; 36 List<PhysicsObject> laatikkoLista = new List<PhysicsObject>(); 34 37 35 38 SoundEffect maaliAani = LoadSoundEffect("maali"); … … 52 55 esineAjastin.Timeout += delegate 53 56 { 54 esineAjastin.Interval = RandomGen.NextInt(5, 10); 55 56 PhysicsObject laatikko = new PhysicsObject(RUUDUN_KOKO, RUUDUN_KOKO); 57 laatikko.Color = Color.Black; 58 laatikko.Position = new Vector(RandomGen.NextDouble(Level.Left, Level.Right), 800); 59 Add(laatikko); 57 if (laatikkoLista.Count < 5) 58 { 59 esineAjastin.Interval = RandomGen.NextInt(5, 10); 60 61 PhysicsObject laatikko = new PhysicsObject(RUUDUN_KOKO, RUUDUN_KOKO); 62 laatikko.Position = new Vector(RandomGen.NextDouble(Level.Left, Level.Right), 500); 63 laatikko.Mass = 170.0; 64 laatikko.Image = laatikkokuva; 65 laatikko.Tag = "laatikko"; 66 laatikkoLista.Add(laatikko); 67 Add(laatikko); 68 } 60 69 }; 61 70 esineAjastin.Start(); … … 73 82 kentta2.SetTileMethod('S', Lisaaseina); 74 83 kentta2.SetTileMethod('Z', Lisaazombi); 84 kentta2.SetTileMethod('A', LisaaAlien); 75 85 kentta2.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 76 86 … … 113 123 pelaaja1 = new PlatformCharacter(leveys - 5, korkeus * 2 - 5); 114 124 pelaaja1.Position = paikka; 115 pelaaja1.Mass = 4.0;125 pelaaja1.Mass = 20.0; 116 126 pelaaja1.Image = pelaajanKuva; 117 127 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); … … 156 166 Zombi zombi = new Zombi(RUUDUN_KOKO - 5, RUUDUN_KOKO * 1.99 - 5); 157 167 zombi.Position = paikka; 158 zombi.Mass = 4.0;168 zombi.Mass = 20.0; 159 169 zombi.Image = zombikuva; 160 170 zombi.CollisionIgnoreGroup = 1; … … 226 236 } 227 237 238 void LisaaAlien(Vector paikka, double leveys, double korkeus) 239 { 240 PlatformCharacter alien = new PlatformCharacter(76, 42); 241 alien.Mass = 10.0; 242 alien.Position = paikka; 243 alien.Image = alienkuva; 244 alien.CollisionIgnoreGroup = 1; 245 alien.CanRotate = false; 246 alien.Tag = "alien"; 247 Add(alien); 248 } 228 249 229 250 void LisaaNappaimet() … … 235 256 Keyboard.Listen(Key.D, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 236 257 Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 258 259 Keyboard.Listen(Key.E, ButtonState.Pressed, AvaaLaatikko, "Avaa laatikko"); 237 260 238 261 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); … … 310 333 } 311 334 335 void AvaaLaatikko() 336 { 337 PhysicsObject lahinLaatikko = null; 338 339 foreach (PhysicsObject laatikko in laatikkoLista) 340 { 341 if (Vector.Distance(pelaaja1.Position, laatikko.Position) < 65) lahinLaatikko = laatikko; 342 } 343 344 if (lahinLaatikko != null) 345 { 346 lahinLaatikko.Destroy(); 347 laatikkoLista.Remove(lahinLaatikko); 348 } 349 } 312 350 } 313 351 -
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last Light/obj/x86/Debug/ContentPipeline-{1C34B668-D9F3-4304-A5FC-ECD367C2BC30}.xml
r5835 r5846 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\pelaaja.xnb</Output> 29 <Time>2015-0 4-18T10:00:53.3134467+03:00</Time>29 <Time>2015-05-16T11:05:57.5140827+03:00</Time> 30 30 </Item> 31 31 <Item> … … 126 126 <Options>None</Options> 127 127 <Output>C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\kentta1.xnb</Output> 128 <Time>2015-0 4-18T14:57:01.8156256+03:00</Time>128 <Time>2015-05-16T13:50:30.168821+03:00</Time> 129 129 </Item> 130 130 <Item> … … 145 145 <Output>C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\puukotus.xnb</Output> 146 146 <Time>2015-04-18T14:56:02.0916256+03:00</Time> 147 </Item> 148 <Item> 149 <Source>laatikko.png</Source> 150 <Name>laatikko</Name> 151 <Importer>TextureImporter</Importer> 152 <Processor>TextureProcessor</Processor> 153 <Options>None</Options> 154 <Output>C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\laatikko.xnb</Output> 155 <Time>2015-05-16T10:02:03.0772827+03:00</Time> 156 </Item> 157 <Item> 158 <Source>alien.png</Source> 159 <Name>alien</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 <Options>None</Options> 163 <Output>C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\alien.xnb</Output> 164 <Time>2015-05-16T11:06:55.5936827+03:00</Time> 147 165 </Item> 148 166 <BuildSuccessful>true</BuildSuccessful> -
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last Light/obj/x86/Debug/Last Light.csproj.FileListAbsolute.txt
r5835 r5846 23 23 C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\puukko.xnb 24 24 C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\puukotus.xnb 25 C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\laatikko.xnb 26 C:\MyTemp\OttoR\Last Light\Last Light\Last Light\bin\x86\Debug\Content\alien.xnb -
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last Light/obj/x86/Debug/cachefile-{1C34B668-D9F3-4304-A5FC-ECD367C2BC30}-targetpath.txt
r5835 r5846 15 15 Content\puukko.xnb 16 16 Content\puukotus.xnb 17 Content\laatikko.xnb 18 Content\alien.xnb -
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last LightContent/Last LightContent.contentproj
r5835 r5846 153 153 </Compile> 154 154 </ItemGroup> 155 <ItemGroup> 156 <Compile Include="laatikko.png"> 157 <Name>laatikko</Name> 158 <Importer>TextureImporter</Importer> 159 <Processor>TextureProcessor</Processor> 160 </Compile> 161 </ItemGroup> 162 <ItemGroup> 163 <Compile Include="alien.png"> 164 <Name>alien</Name> 165 <Importer>TextureImporter</Importer> 166 <Processor>TextureProcessor</Processor> 167 </Compile> 168 </ItemGroup> 155 169 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 156 170 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2014/koodauskerho/38/OttoR/Last Light/Last Light/Last LightContent/kentta1.txt
r5835 r5846 15 15 16 16 17 17 Z 18 18 ######### ### 19 19 # # … … 24 24 # S 25 25 # N 26 # #27 # #############28 # S S 29 # 30 # 31 ######### ##### 32 # # 33 # # 34 # # # 35 # ## #36 ### ######## 37 # S 38 # 39 # # Z Z Z40 ##################################################### ###################################################################26 # # 27 # ############ 28 # S S 29 # 30 ## ZZZZ ZZ 31 ######### ##### 32 # # 33 # # 34 # # # A 35 # Z ## # ########### ######### # 36 ### ######## # 37 # S # 38 # ## # 39 # # Z ## # 40 #####################################################
Note: See TracChangeset
for help on using the changeset viewer.