- Timestamp:
- 2015-07-23 09:56:28 (8 years ago)
- Location:
- 2015/30/EliasHy/SpaceAdventure
- Files:
-
- 4 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventure/SpaceAdventure.cs
r6921 r6951 15 15 Image CoolAsteroidi = LoadImage("cool asteroid bu"); 16 16 Image taustaKuva = LoadImage("cool space"); 17 Image Cloud = LoadImage("cloud"); 17 18 Image Laser = LoadImage("laser"); 18 19 Image Boss = LoadImage("Boss Ship_zpspn6osve5"); 19 20 Image Vihollinenalus = LoadImage("enemy ship 2"); 21 22 IntMeter pistelaskuri; 20 23 21 24 double eteenpain = 500; … … 36 39 Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", pelaaja); 37 40 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 41 LuoPistelaskuri(); 38 42 } 39 43 … … 69 73 ruudut.SetTileMethod(Color.Gold, LuoAsteroidi); 70 74 ruudut.SetTileMethod(Color.FromHexCode("FF0000"), LuoVihollinen2); 75 ruudut.SetTileMethod(Color.FromHexCode("B200FF"), LuoReuna); 71 76 72 77 //Level.CreateBorders(); 73 Level.CreateBorders();74 78 75 79 //3. Execute luo kentän … … 77 81 ruudut.Execute(20, 20); 78 82 } 83 84 void LuoReuna(Vector paikka, double leveys, double korkeus) 85 { 86 //PhysicsObject Asteroidi = new PhysicsObject(10, 10); 87 PhysicsObject Reuna = PhysicsObject.CreateStaticObject(Cloud); 88 Reuna.Position = paikka; 89 Reuna.Tag = "reuna"; 90 Add(Reuna); 91 92 } 93 79 94 void LuoPelaaja(Vector paikka, double leveys, double korkeus) 80 95 { … … 86 101 pelaaja.Position = paikka; 87 102 pelaaja.AngularDamping = 0.9; 103 pelaaja.Tag = "pelaaja"; 88 104 89 105 ase = new AssaultRifle(1, 1); … … 101 117 102 118 //AddCollisionHandler(Laser, CollisionHandler.ExplodeTarget(150, false)); 119 FollowerBrain seuraajanAivot = new FollowerBrain("pelaaja"); 120 seuraajanAivot.Speed = 70; 121 Vihollinen.Brain = seuraajanAivot; 103 122 104 105 //Tehdään uudet satunnaisaivot, jotka liikkuvat nopeudella 200106 RandomMoverBrain satunnaisAivot = new RandomMoverBrain(150);107 108 //Ominaisuuksien muokkaaminen109 satunnaisAivot.ChangeMovementSeconds = 3;110 111 //Aivot käyttöön oliolle112 Vihollinen.Brain = satunnaisAivot;113 123 114 124 } … … 127 137 PhysicsObject Vihollinen2 = new PhysicsObject(Vihollinenalus); 128 138 Vihollinen2.Color = Color.Gold; 139 Vihollinen2.Size = new Vector(50, 50); 129 140 Vihollinen2.Position = paikka; 130 141 Add(Vihollinen2); 131 142 Vihollinen2.Tag = "pahis2"; 143 144 //Tehdään uudet satunnaisaivot, jotka liikkuvat nopeudella 200 145 RandomMoverBrain satunnaisAivot = new RandomMoverBrain(150); 146 147 //Ominaisuuksien muokkaaminen 148 satunnaisAivot.ChangeMovementSeconds = 3; 149 Vihollinen2.Brain = satunnaisAivot; 132 150 133 151 } … … 135 153 void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 136 154 { 155 if (kohde.Tag.ToString() != "reuna") 156 { 157 kohde.Destroy(); 158 pistelaskuri.Value += 1; 159 } 160 ammus.Destroy(); 161 162 } 163 164 void LuoPistelaskuri() 165 { 137 166 138 167 168 pistelaskuri = new IntMeter(0); 169 170 Label pisteNaytto = new Label(); 171 pisteNaytto.X = Screen.Left + 100; 172 pisteNaytto.Y = Screen.Top - 100; 173 pisteNaytto.TextColor = Color.Black; 174 pisteNaytto.Color = Color.White; 175 pisteNaytto.Title = "Pisteet"; 176 pisteNaytto.BindTo(pistelaskuri); 177 Add(pisteNaytto); 139 178 } 179 140 180 void AmmuAseella(PhysicsObject pelaaja) 141 181 { … … 144 184 if (ammus != null) 145 185 { 186 ammus.Tag = "ammus"; 146 187 ammus.Size *= 0.5; 147 188 ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 189 148 190 ammus.Image = Laser; 191 ase.FireRate = 3.0; 192 193 AddCollisionHandler(ammus, AmmusOsui); 149 194 } 150 195 } -
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventure/SpaceAdventure.csproj.Debug.cachefile
r6918 r6951 7 7 Content\Boss Ship_zpspn6osve5.xnb 8 8 Content\enemy ship 2.xnb 9 Content\cloud.xnb 10 Content\laser.xnb -
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventure/obj/x86/Debug/SpaceAdventure.csproj.FileListAbsolute.txt
r6918 r6951 15 15 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb 16 16 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb 17 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb 18 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb 19 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb 20 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb 21 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb 22 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb 23 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb 24 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb 25 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\SpaceAdventure.exe 26 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\SpaceAdventure.pdb 27 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Jypeli.dll 28 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Jypeli.xml 29 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.csprojResolveAssemblyReference.cache 30 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 31 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.exe 32 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.pdb 33 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cloud.xnb 34 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\laser.xnb -
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventure/obj/x86/Debug/cachefile-{A53A8295-A762-4A93-989B-CDE36F5CC9A7}-targetpath.txt
r6918 r6951 7 7 Content\Boss Ship_zpspn6osve5.xnb 8 8 Content\enemy ship 2.xnb 9 Content\cloud.xnb 10 Content\laser.xnb -
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventureContent/SpaceAdventureContent.contentproj
r6918 r6951 101 101 </Compile> 102 102 </ItemGroup> 103 <ItemGroup> 104 <Compile Include="cloud.png"> 105 <Name>cloud</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 </Compile> 109 <Compile Include="laser.png"> 110 <Name>laser</Name> 111 <Importer>TextureImporter</Importer> 112 <Processor>TextureProcessor</Processor> 113 </Compile> 114 </ItemGroup> 103 115 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 104 116 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventureContent/obj/x86/Debug/ContentPipeline.xml
r6918 r6951 8 8 <Processor>TextureProcessor</Processor> 9 9 <Options>None</Options> 10 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb</Output>11 <Time>2015-07-2 2T12:37:40.9096187+03:00</Time>10 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb</Output> 11 <Time>2015-07-23T09:45:06.3199068+03:00</Time> 12 12 </Item> 13 13 <Item> … … 17 17 <Processor>TextureProcessor</Processor> 18 18 <Options>None</Options> 19 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb</Output>20 <Time>2015-07-2 1T14:12:05.8146469+03:00</Time>19 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb</Output> 20 <Time>2015-07-23T09:45:06.3229068+03:00</Time> 21 21 </Item> 22 22 <Item> … … 26 26 <Processor>TextureProcessor</Processor> 27 27 <Options>None</Options> 28 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb</Output>29 <Time>2015-07-2 1T14:55:03.3357265+03:00</Time>28 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb</Output> 29 <Time>2015-07-23T09:45:06.3069068+03:00</Time> 30 30 </Item> 31 31 <Item> … … 35 35 <Processor>TextureProcessor</Processor> 36 36 <Options>None</Options> 37 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb</Output>38 <Time>2015-07-2 2T11:35:17.1851187+03:00</Time>37 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb</Output> 38 <Time>2015-07-23T09:45:06.3329068+03:00</Time> 39 39 </Item> 40 40 <Item> … … 44 44 <Processor>TextureProcessor</Processor> 45 45 <Options>None</Options> 46 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb</Output>47 <Time>2015-07-2 1T14:55:35.1129265+03:00</Time>46 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb</Output> 47 <Time>2015-07-23T09:45:06.3259068+03:00</Time> 48 48 </Item> 49 49 <Item> … … 53 53 <Processor>TextureProcessor</Processor> 54 54 <Options>None</Options> 55 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb</Output>56 <Time>2015-07-2 2T11:05:32.8286354+03:00</Time>55 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb</Output> 56 <Time>2015-07-23T09:45:06.4709068+03:00</Time> 57 57 </Item> 58 58 <Item> … … 62 62 <Processor>TextureProcessor</Processor> 63 63 <Options>None</Options> 64 <Output>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb</Output>65 <Time>2015-07-2 2T12:56:39.8323187+03:00</Time>64 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb</Output> 65 <Time>2015-07-23T09:45:06.3039068+03:00</Time> 66 66 </Item> 67 67 <Item> … … 71 71 <Processor>TextureProcessor</Processor> 72 72 <Options>None</Options> 73 <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb</Output> 74 <Time>2015-07-22T13:01:57.3205187+03:00</Time> 73 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb</Output> 74 <Time>2015-07-23T09:45:06.3299068+03:00</Time> 75 </Item> 76 <Item> 77 <Source>cloud.png</Source> 78 <Name>cloud</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cloud.xnb</Output> 83 <Time>2015-07-23T09:46:46.4079068+03:00</Time> 84 </Item> 85 <Item> 86 <Source>laser.png</Source> 87 <Name>laser</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\laser.xnb</Output> 92 <Time>2015-07-23T09:46:46.4089068+03:00</Time> 75 93 </Item> 76 94 <BuildSuccessful>true</BuildSuccessful> … … 80 98 <BuildConfiguration>Debug</BuildConfiguration> 81 99 <CompressContent>false</CompressContent> 82 <RootDirectory>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventureContent\</RootDirectory>83 <LoggerRootDirectory>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\</LoggerRootDirectory>84 <IntermediateDirectory>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventureContent\obj\x86\Debug\</IntermediateDirectory>85 <OutputDirectory>C:\MyTemp\ EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\</OutputDirectory>100 <RootDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventureContent\</RootDirectory> 101 <LoggerRootDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\</LoggerRootDirectory> 102 <IntermediateDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventureContent\obj\x86\Debug\</IntermediateDirectory> 103 <OutputDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\</OutputDirectory> 86 104 </Settings> 87 105 <Assemblies> … … 120 138 <Assembly> 121 139 <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> 122 <Value>2015-07-09T14: 51:24.2760228+03:00</Value>140 <Value>2015-07-09T14:19:15.2277481+03:00</Value> 123 141 </Assembly> 124 142 </Assemblies> -
2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventureContent/obj/x86/Debug/SpaceAdventureContent.contentproj.FileListAbsolute.txt
r6913 r6951 1 1 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventureContent\obj\x86\Debug\SpaceAdventureContent.contentprojResolveAssemblyReference.cache 2 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventureContent\obj\x86\Debug\SpaceAdventureContent.contentprojResolveAssemblyReference.cache
Note: See TracChangeset
for help on using the changeset viewer.