- Timestamp:
- 2015-07-22 11:45:09 (8 years ago)
- Location:
- 2015/30/SamuelL
- Files:
-
- 21 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/SamuelL/jotain/jotain/jotain/jotain.cs
r6842 r6907 21 21 Image kasvi2 = LoadImage("tausta - kasvit 2"); 22 22 Image taustaruoho = LoadImage("tausta ruoho"); 23 Image tuli = LoadImage("tulikuva"); 24 Image Pimeyskuva = LoadImage("pimeys"); 25 Image valokuva = LoadImage("valokuva"); 23 26 24 27 SoundEffect maaliAani = LoadSoundEffect("maali"); 28 SoundEffect TuliPalo = LoadSoundEffect("tuli"); 25 29 26 30 public override void Begin() … … 34 38 Camera.ZoomFactor = 1.2; 35 39 Camera.StayInLevel = true; 40 MediaPlayer.Play("tuli"); 41 MediaPlayer.IsRepeating = true; 36 42 } 37 43 … … 45 51 kentta.SetTileMethod('K', LisaaKasvi, kasvi2, -1); 46 52 kentta.SetTileMethod('r', Lisaaruoho, taustaruoho, 1); 53 kentta.SetTileMethod('T', Lisaatuli); 54 kentta.SetTileMethod('V', LisaaVaihto); 47 55 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 48 56 kentta.Optimize('#'); … … 50 58 Level.Background.Image = Taustakuva; 51 59 Level.Background.FitToLevel(); 60 61 52 62 } 53 63 … … 67 77 kasvi.Image = kuva; 68 78 79 GameObject valo = new GameObject(100, 100); 80 valo.Image = valokuva; 81 valo.Position = paikka; 82 Add(valo, 3); 69 83 } 70 84 … … 96 110 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 97 111 Add(pelaaja1); 112 113 GameObject pimeys = new GameObject(2700, 2700); 114 pimeys.Image = Pimeyskuva; 115 Add(pimeys,2); 116 Timer ajastin = new Timer(); 117 ajastin.Interval = 0.05; 118 ajastin.Timeout += delegate 119 { 120 pimeys.Position = pelaaja1.Position; 121 }; 122 ajastin.Start(); 98 123 } 99 124 … … 132 157 tahti.Destroy(); 133 158 } 159 160 void Lisaatuli(Vector paikka, double leveys, double korkeus) 161 { 162 163 Flame liekki = new Flame(tuli); 164 liekki.MinLifetime = 0.1; 165 liekki.MaxLifetime = 0.5; 166 liekki.MinScale = 10; 167 liekki.MaxScale = 30; 168 liekki.Position = paikka; 169 Add(liekki); 170 171 Timer ajastin = new Timer(); 172 ajastin.Interval = 0.05; 173 ajastin.Timeout += delegate 174 { 175 liekki.Position = paikka + RandomGen.NextVector(0, 30); 176 }; 177 ajastin.Start(); 178 } 179 180 void LisaaVaihto(Vector paikka, double leveys, double korkeus) 181 { 182 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 183 taso.Position = paikka; 184 taso.IsVisible = true; 185 Add(taso); 186 187 } 188 134 189 } -
2015/30/SamuelL/jotain/jotain/jotain/jotain.csproj.Debug.cachefile
r6842 r6907 7 7 Content\tausta ruoho.xnb 8 8 Content\tausta 1.xnb 9 Content\kÀvely loulassa.xnb 10 Content\tuli.xnb 11 Content\kÀvely ruohossa.xnb 12 Content\kivi 2.xnb 13 Content\kivi.xnb 14 Content\luola.xnb 15 Content\spooky.xnb 16 Content\tulikuva.xnb 17 Content\kentta2.xnb 18 Content\pimeys.xnb 19 Content\valokuva.xnb -
2015/30/SamuelL/jotain/jotain/jotainContent/jotainContent.contentproj
r6842 r6907 95 95 </Compile> 96 96 </ItemGroup> 97 <ItemGroup> 98 <Compile Include="kivi 2.png"> 99 <Name>kivi 2</Name> 100 <Importer>TextureImporter</Importer> 101 <Processor>TextureProcessor</Processor> 102 </Compile> 103 <Compile Include="kivi.png"> 104 <Name>kivi</Name> 105 <Importer>TextureImporter</Importer> 106 <Processor>TextureProcessor</Processor> 107 </Compile> 108 <Compile Include="luola.png"> 109 <Name>luola</Name> 110 <Importer>TextureImporter</Importer> 111 <Processor>TextureProcessor</Processor> 112 </Compile> 113 </ItemGroup> 114 <ItemGroup> 115 <Compile Include="kävely loulassa.wav"> 116 <Name>kävely loulassa</Name> 117 <Importer>WavImporter</Importer> 118 <Processor>SoundEffectProcessor</Processor> 119 </Compile> 120 <Compile Include="tuli.wav"> 121 <Name>tuli</Name> 122 <Importer>WavImporter</Importer> 123 <Processor>SoundEffectProcessor</Processor> 124 </Compile> 125 </ItemGroup> 126 <ItemGroup> 127 <Compile Include="kävely ruohossa.wav"> 128 <Name>kävely ruohossa</Name> 129 <Importer>WavImporter</Importer> 130 <Processor>SoundEffectProcessor</Processor> 131 </Compile> 132 </ItemGroup> 133 <ItemGroup> 134 <Compile Include="spooky.wav"> 135 <Name>spooky</Name> 136 <Importer>WavImporter</Importer> 137 <Processor>SoundEffectProcessor</Processor> 138 </Compile> 139 </ItemGroup> 140 <ItemGroup> 141 <Compile Include="tulikuva.png"> 142 <Name>tulikuva</Name> 143 <Importer>TextureImporter</Importer> 144 <Processor>TextureProcessor</Processor> 145 </Compile> 146 </ItemGroup> 147 <ItemGroup> 148 <Compile Include="kentta2.txt"> 149 <Name>kentta2</Name> 150 <Importer>TextFileImporter</Importer> 151 <Processor>TextFileContentProcessor</Processor> 152 </Compile> 153 </ItemGroup> 154 <ItemGroup> 155 <Compile Include="pimeys.png"> 156 <Name>pimeys</Name> 157 <Importer>TextureImporter</Importer> 158 <Processor>TextureProcessor</Processor> 159 </Compile> 160 </ItemGroup> 161 <ItemGroup> 162 <Compile Include="valokuva.png"> 163 <Name>valokuva</Name> 164 <Importer>TextureImporter</Importer> 165 <Processor>TextureProcessor</Processor> 166 </Compile> 167 </ItemGroup> 97 168 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 98 169 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/30/SamuelL/jotain/jotain/jotainContent/kentta1.txt
r6867 r6907 7 7 8 8 # 9 # N k K10 # 9 #T N k K 10 # TT rrrrrrrrrrrrrrr 11 11 #################### 12 12 #################### … … 16 16 #################### 17 17 #################### 18 #################### 18 ####################VVVVVVVVVVVVVV
Note: See TracChangeset
for help on using the changeset viewer.