Changeset 9115
- Timestamp:
- 2017-07-26 11:46:29 (3 years ago)
- Location:
- 2017/30/TuomasH
- Files:
-
- 8 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/30/TuomasH/Snake/Snake/Snake/Snake.cs
r9099 r9115 15 15 GameObject omena; 16 16 List<GameObject> matopalat = new List<GameObject>(); 17 EasyHighScore toplista = new EasyHighScore(); 18 Timer aikalaskuri = new Timer(); 19 17 20 18 19 21 public override void Begin() 20 22 { 21 LuoMaailma();22 23 24 Aloitus();25 23 26 24 25 Aloitus(); 27 26 27 28 29 28 30 29 31 } … … 42 44 LuoMatopala(3 * Ruudunkoko, 3 * Ruudunkoko); 43 45 omena = new GameObject(Ruudunkoko, Ruudunkoko); 44 omena. Color = Color.BloodRed;46 omena.Image = LoadImage("omena2"); 45 47 Add(omena); 48 46 49 47 50 … … 51 54 paivitysAjastin.Timeout += Mato; 52 55 paivitysAjastin.Start(); 56 Mouse.IsCursorVisible = true; 57 53 58 Ohjaimet(); 59 LuoAikalaskuri(); 60 LuoMaailma(); 61 Mato(); 62 Alkuvalikko(); 63 54 64 } 55 65 … … 67 77 matopalat.RemoveAt(0); 68 78 matopalat.Add(paa); 79 69 80 70 81 for (int i = 0; i < matopalat.Count - 1; i++) … … 90 101 } 91 102 } 103 92 104 } 105 93 106 94 107 void Ohjaimet() … … 114 127 Add(pala); 115 128 } 129 130 void LuoAikalaskuri() 131 { 132 133 aikalaskuri.Start(); 134 Label aikanaytto = new Label(); 135 aikanaytto.TextColor = Color.White; 136 aikanaytto.DecimalPlaces = 1; 137 aikanaytto.BindTo(aikalaskuri.SecondCounter); 138 Add(aikanaytto); 139 aikanaytto.X = Level.Right + 300; 140 aikanaytto.Y = Level.Top - 200; 141 aikanaytto.Title = "Aika"; 142 143 116 144 145 } 146 void Alkuvalikko() 147 { 148 MultiSelectWindow alkuvalikko = new MultiSelectWindow("Alkuvalikko", "Aloita peli", null, "Lopeta"); 149 Add(alkuvalikko); 150 alkuvalikko.AddItemHandler(0, Aloitus); 151 alkuvalikko.AddItemHandler(1, null); 152 alkuvalikko.AddItemHandler(2, Exit); 153 alkuvalikko.Color = Color.Green; 154 155 } 156 117 157 } -
2017/30/TuomasH/Snake/Snake/Snake/obj/x86/Debug/ContentPipeline-{20D33183-98B4-4A6F-A502-A5C075B53511}.xml
r9095 r9115 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>omena.png</Source> 6 <Name>omena</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\TuomasH\Snake\Snake\Snake\bin\x86\Debug\Content\omena.xnb</Output> 11 <Time>2017-07-26T10:14:26.9366854+03:00</Time> 12 </Item> 13 <Item> 14 <Source>omena2.png</Source> 15 <Name>omena2</Name> 16 <Importer>TextureImporter</Importer> 17 <Processor>TextureProcessor</Processor> 18 <Options>None</Options> 19 <Output>C:\MyTemp\TuomasH\Snake\Snake\Snake\bin\x86\Debug\Content\omena2.xnb</Output> 20 <Time>2017-07-26T11:02:39.2466487+03:00</Time> 21 </Item> 4 22 <BuildSuccessful>true</BuildSuccessful> 5 23 <Settings> … … 16 34 <Assemblies> 17 35 <Assembly> 36 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 37 <Value>2015-02-09T20:18:44+02:00</Value> 38 </Assembly> 39 <Assembly> 40 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 41 <Value>2011-09-01T16:22:30+03:00</Value> 42 </Assembly> 43 <Assembly> 44 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 45 <Value>2011-09-01T16:22:30+03:00</Value> 46 </Assembly> 47 <Assembly> 48 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 49 <Value>2011-09-01T16:22:30+03:00</Value> 50 </Assembly> 51 <Assembly> 52 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 53 <Value>2011-09-01T16:22:30+03:00</Value> 54 </Assembly> 55 <Assembly> 56 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 57 <Value>2011-09-01T16:22:30+03:00</Value> 58 </Assembly> 59 <Assembly> 60 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 61 <Value>2011-09-01T16:22:30+03:00</Value> 62 </Assembly> 63 <Assembly> 64 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 65 <Value>2015-02-17T22:27:18+02:00</Value> 66 </Assembly> 67 <Assembly> 18 68 <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> 19 69 <Value>2017-06-17T01:49:06.5448045+03:00</Value> -
2017/30/TuomasH/Snake/Snake/Snake/obj/x86/Debug/Snake.csproj.FileListAbsolute.txt
r9095 r9115 7 7 C:\MyTemp\TuomasH\Snake\Snake\Snake\obj\x86\Debug\Snake.exe 8 8 C:\MyTemp\TuomasH\Snake\Snake\Snake\obj\x86\Debug\Snake.pdb 9 C:\MyTemp\TuomasH\Snake\Snake\Snake\bin\x86\Debug\Content\omena.xnb 10 C:\MyTemp\TuomasH\Snake\Snake\Snake\bin\x86\Debug\Content\omena2.xnb -
2017/30/TuomasH/Snake/Snake/SnakeContent/SnakeContent.contentproj
r9095 r9115 45 45 <Reference Include="AnimationExtension" /> 46 46 </ItemGroup> 47 <ItemGroup> 48 <Compile Include="omena.png"> 49 <Name>omena</Name> 50 <Importer>TextureImporter</Importer> 51 <Processor>TextureProcessor</Processor> 52 </Compile> 53 </ItemGroup> 54 <ItemGroup> 55 <Compile Include="omena2.png"> 56 <Name>omena2</Name> 57 <Importer>TextureImporter</Importer> 58 <Processor>TextureProcessor</Processor> 59 </Compile> 60 </ItemGroup> 47 61 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 48 62 <!-- 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.