Changeset 7774


Ignore:
Timestamp:
2016-07-05 12:58:44 (7 years ago)
Author:
jotapoti
Message:

Luolia, joihin voi menna.
Vihollinen aloiteltu

Location:
2016/27/JouniP
Files:
10 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.cs

    r7744 r7774  
    1818    Image tahtiKuva = LoadImage("tahti"); 
    1919    Image ruohonKuva = LoadImage("ruohotekstuuri"); 
     20    Image luolanKuva = LoadImage("luola"); 
     21    Image ilkeanOmenanKuva = LoadImage("ilkeaomena"); 
    2022      
    2123    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    3941        kentta.SetTileMethod('*', LisaaTahti); 
    4042        kentta.SetTileMethod('N', LisaaPelaaja); 
     43        kentta.SetTileMethod('O', LisaaLuola); 
     44        kentta.SetTileMethod('z', LisaaIlkeaTyyppi); 
    4145        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4246        Level.CreateBorders(); 
    4347        Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     48    } 
     49 
     50    void LisaaIlkeaTyyppi(Vector paikka, double leveys, double korkeus) 
     51    { 
     52        // TODO lisaa tekoaly talle ilkealle tyypille! 
     53        PhysicsObject tyyppi = new PhysicsObject(leveys, korkeus); 
     54        tyyppi.Position = paikka; 
     55        tyyppi.Image = ilkeanOmenanKuva; 
     56        Add(tyyppi); 
     57    } 
     58    void LisaaLuola(Vector paikka, double leveys, double korkeus) 
     59    { 
     60        PhysicsObject luola = new PhysicsObject(2*leveys, 2*korkeus); 
     61        luola.MakeStatic(); 
     62        luola.IgnoresCollisionResponse = true; 
     63        //luola.Color = Color.Black; 
     64        luola.Position = paikka + new Vector(0.0, korkeus/2); 
     65        luola.Tag = "luola"; 
     66        luola.Image = luolanKuva; 
     67 
     68        Add(luola); 
    4469    } 
    4570 
     
    7095        pelaaja1.Image = pelaajanKuva; 
    7196        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     97        AddCollisionHandler(pelaaja1, "luola", TormaaLuolaan); 
    7298        Add(pelaaja1); 
    7399    } 
     
    107133        tahti.Destroy(); 
    108134    } 
     135 
     136    void TormaaLuolaan(PhysicsObject hahmo, PhysicsObject luola) 
     137    { 
     138        // TODO hahmo siirtyy toiseen kenttaan! 
     139        MessageDisplay.Add("Menit luolaan!"); 
     140    } 
     141 
    109142} 
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.csproj.Debug.cachefile

    r7744 r7774  
    44Content\kentta1.xnb 
    55Content\ruohotekstuuri.xnb 
     6Content\luola.xnb 
     7Content\ilkeaomena.xnb 
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragore/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7744 r7774  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-07-05T09:43:08.7334497+03:00</Time> 
     38      <Time>2016-07-05T12:56:24.6561004+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4646      <Output>C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\ruohotekstuuri.xnb</Output> 
    4747      <Time>2016-07-05T09:41:25.4812623+03:00</Time> 
     48    </Item> 
     49    <Item> 
     50      <Source>luola.png</Source> 
     51      <Name>luola</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\luola.xnb</Output> 
     56      <Time>2016-07-05T12:48:45.3923319+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>ilkeaomena.png</Source> 
     60      <Name>ilkeaomena</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\ilkeaomena.xnb</Output> 
     65      <Time>2016-07-05T12:54:07.5216073+03:00</Time> 
    4866    </Item> 
    4967    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragore/obj/x86/Debug/VenienteFragore.csproj.FileListAbsolute.txt

    r7744 r7774  
    1111C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\obj\x86\Debug\VenienteFragore.pdb 
    1212C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\ruohotekstuuri.xnb 
     13C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\obj\x86\Debug\VenienteFragore.csprojResolveAssemblyReference.cache 
     14C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\luola.xnb 
     15C:\MyTemp\JouniP\VenienteFragore\VenienteFragore\VenienteFragore\bin\x86\Debug\Content\ilkeaomena.xnb 
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragore/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7744 r7774  
    44Content\kentta1.xnb 
    55Content\ruohotekstuuri.xnb 
     6Content\luola.xnb 
     7Content\ilkeaomena.xnb 
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragoreContent/VenienteFragoreContent.contentproj

    r7744 r7774  
    7474    </Compile> 
    7575  </ItemGroup> 
     76  <ItemGroup> 
     77    <Compile Include="luola.png"> 
     78      <Name>luola</Name> 
     79      <Importer>TextureImporter</Importer> 
     80      <Processor>TextureProcessor</Processor> 
     81    </Compile> 
     82  </ItemGroup> 
     83  <ItemGroup> 
     84    <Compile Include="ilkeaomena.png"> 
     85      <Name>ilkeaomena</Name> 
     86      <Importer>TextureImporter</Importer> 
     87      <Processor>TextureProcessor</Processor> 
     88    </Compile> 
     89  </ItemGroup> 
    7690  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    7791  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/27/JouniP/VenienteFragore/VenienteFragore/VenienteFragoreContent/kentta1.txt

    r7744 r7774  
    1 .........*...................... 
    2 .........##..................... 
    3 ................................ 
    4 .......*....*................... 
    5 .......##..##................... 
    6 ................................ 
    7 .....*........*................. 
    8 .....##..##..##................. 
    9 ................................ 
    10 ...*....*..*....*............... 
    11 ...##..##..##..##............... 
    12 ................................ 
    13 .*....*.......*...*............. 
    14 .##..##..##..##..##..*********.. 
    15 ..................***********... 
    16 ..........N.......************.. 
    17 ################################ 
     1.........*.......................... 
     2.........##......................... 
     3.................................... 
     4.......*....*....................... 
     5.......##..##....................... 
     6.................................... 
     7.....*........*..................... 
     8.....##..##..##..................... 
     9.................................... 
     10...*....*..*....*................... 
     11...##..##..##..##................... 
     12.................................... 
     13.*....*.......*...*................. 
     14.##..##..##..##..##..*********...... 
     15.............O....***********....... 
     16......z....N.......************...O. 
     17#################################### 
Note: See TracChangeset for help on using the changeset viewer.