Changeset 6907 for 2015


Ignore:
Timestamp:
2015-07-22 11:45:09 (8 years ago)
Author:
misakana
Message:
 
Location:
2015/30/SamuelL
Files:
21 added
5 edited

Legend:

Unmodified
Added
Removed
  • 2015/30/SamuelL/jotain/jotain/jotain/jotain.cs

    r6842 r6907  
    2121    Image kasvi2 = LoadImage("tausta - kasvit 2"); 
    2222    Image taustaruoho = LoadImage("tausta ruoho"); 
     23    Image tuli = LoadImage("tulikuva"); 
     24    Image Pimeyskuva = LoadImage("pimeys"); 
     25    Image valokuva = LoadImage("valokuva"); 
    2326 
    2427    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     28    SoundEffect TuliPalo = LoadSoundEffect("tuli"); 
    2529 
    2630    public override void Begin() 
     
    3438        Camera.ZoomFactor = 1.2; 
    3539        Camera.StayInLevel = true; 
     40        MediaPlayer.Play("tuli"); 
     41        MediaPlayer.IsRepeating = true; 
    3642    } 
    3743 
     
    4551        kentta.SetTileMethod('K', LisaaKasvi, kasvi2, -1); 
    4652        kentta.SetTileMethod('r', Lisaaruoho, taustaruoho, 1); 
     53        kentta.SetTileMethod('T', Lisaatuli); 
     54        kentta.SetTileMethod('V', LisaaVaihto); 
    4755        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4856        kentta.Optimize('#'); 
     
    5058        Level.Background.Image = Taustakuva; 
    5159        Level.Background.FitToLevel(); 
     60 
     61 
    5262    } 
    5363 
     
    6777        kasvi.Image = kuva; 
    6878 
     79        GameObject valo = new GameObject(100, 100); 
     80        valo.Image = valokuva; 
     81        valo.Position = paikka; 
     82        Add(valo, 3); 
    6983    } 
    7084 
     
    96110        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
    97111        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(); 
    98123    } 
    99124 
     
    132157        tahti.Destroy(); 
    133158    } 
     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 
    134189} 
  • 2015/30/SamuelL/jotain/jotain/jotain/jotain.csproj.Debug.cachefile

    r6842 r6907  
    77Content\tausta ruoho.xnb 
    88Content\tausta 1.xnb 
     9Content\kÀvely loulassa.xnb 
     10Content\tuli.xnb 
     11Content\kÀvely ruohossa.xnb 
     12Content\kivi 2.xnb 
     13Content\kivi.xnb 
     14Content\luola.xnb 
     15Content\spooky.xnb 
     16Content\tulikuva.xnb 
     17Content\kentta2.xnb 
     18Content\pimeys.xnb 
     19Content\valokuva.xnb 
  • 2015/30/SamuelL/jotain/jotain/jotainContent/jotainContent.contentproj

    r6842 r6907  
    9595    </Compile> 
    9696  </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> 
    97168  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    98169  <!--  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  
    77            
    88# 
    9 #        N      k   K 
    10 #   rrrrrrrrrrrrrrr 
     9#T       N      k   K 
     10# TT rrrrrrrrrrrrrrr 
    1111####################         
    1212####################  
     
    1616####################  
    1717####################          
    18 ####################  
     18####################VVVVVVVVVVVVVV  
Note: See TracChangeset for help on using the changeset viewer.