Changeset 6987


Ignore:
Timestamp:
2015-07-23 14:59:22 (8 years ago)
Author:
jupipana
Message:
 
Location:
2015/30/JenniN
Files:
11 added
19 edited

Legend:

Unmodified
Added
Removed
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli.cs

    r6930 r6987  
    1919    //Image tahtiKuva = LoadImage("tahti"); 
    2020     
    21     Image hahmonKuva = LoadImage("hahmonsuunnitelma"); 
     21    Image hahmonKuva = LoadImage("Uusihahmo"); 
    2222    Image pahiksenKuva = LoadImage("pahis"); 
     23    Image taustaKuva = LoadImage("tautakuva"); 
     24    Image maalinKuva = LoadImage("KuvaM"); 
     25    Image Savu = LoadImage("sydänsavu"); 
    2326     
    2427 
     
    4144 
    4245 
    43          
     46        Level.Background.Image = taustaKuva; 
     47 
    4448        Camera.Follow(pelaaja1); 
    45         Camera.ZoomFactor = 4; 
     49        Camera.ZoomFactor = 5; 
    4650        Camera.StayInLevel = true; 
    4751 
     
    5761        kentta.SetTileMethod('N', LisaaPelaaja); 
    5862        kentta.SetTileMethod('K', LisaaEste); 
     63        kentta.SetTileMethod('E', LisaaSiirtojuttu); 
     64        kentta.SetTileMethod('M', LisaaMaali); 
     65        kentta.SetTileMethod('U', Lisaakukka); 
    5966         
    6067        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
     
    7481    } 
    7582 
    76   
    77  
    78  
     83 
     84 
     85    void LisaaSiirtojuttu(Vector paikka, double leveys, double korkeus) 
     86    { 
     87        PhysicsObject siirtojuttu = new PhysicsObject(leveys, korkeus); 
     88        siirtojuttu.Position = paikka; 
     89        siirtojuttu.Color = Color.HotPink; 
     90        siirtojuttu.Mass = 7.0; 
     91        Add(siirtojuttu); 
     92    } 
     93 
     94    void LisaaMaali(Vector paikka, double leveys, double korkeus) 
     95    { 
     96        PhysicsObject maali = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     97        maali.IgnoresCollisionResponse = true; 
     98        maali.Position = paikka; 
     99        maali.Image = maalinKuva; 
     100        maali.Tag = "maali"; 
     101        Add(maali); 
     102    } 
    79103 
    80104 
     
    91115    } 
    92116 
     117    void Lisaakukka(Vector paikka, double leveys, double korkeus) 
     118    { 
     119        PhysicsObject kukka = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     120         
     121        kukka.Position = paikka; 
     122        kukka.Shape = Shape.Heart; 
     123        kukka.Color = RandomGen.NextColor(); 
     124        kukka.Tag = "kukka"; 
     125        Add(kukka); 
     126    } 
     127 
    93128    void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
    94129    { 
    95130        pelaaja1 = new PlatformCharacter(leveys, korkeus); 
    96131        pelaaja1.Position = paikka; 
    97         pelaaja1.Mass = 4.0; 
     132        pelaaja1.Mass = 8.0; 
    98133        pelaaja1.Image = hahmonKuva; 
    99134        pelaaja1.Tag = "pelaaja"; 
    100135        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
    101136        AddCollisionHandler(pelaaja1, "este", TormaaEsteeseen); 
    102  
     137        AddCollisionHandler(pelaaja1, "maali", MaaliinTulo); 
     138        AddCollisionHandler(pelaaja1, "kukka", TormaaKukkaan); 
    103139        Add(pelaaja1); 
    104140    } 
    105141 
    106  
     142    void TormaaKukkaan(PhysicsObject hahmo, PhysicsObject kukka) 
     143    { 
     144        Flame liekki = new Flame(Savu); 
     145        liekki.Position = kukka.Position; 
     146        Timer.SingleShot(1.0, delegate { liekki.Destroy(); }); 
     147        Add(liekki); 
     148 
     149    } 
     150 
     151    void MaaliinTulo(PhysicsObject hahmo, PhysicsObject maali) 
     152    { 
     153        Flame liekki = new Flame(hahmonKuva); 
     154        liekki.Position = hahmo.Position; 
     155        Add(liekki); 
     156        Timer.SingleShot(1.0, delegate { hahmo.Destroy(); }); 
     157         
     158         
     159        Label tekstikentta = new Label(200.0, 100.0, "MAALI!"); 
     160        tekstikentta.Font = Font.DefaultLarge; 
     161        tekstikentta.Color = Color.Aqua; 
     162        tekstikentta.TextColor = Color.Red; 
     163        tekstikentta.BorderColor = Color.Black; 
     164        Add(tekstikentta); 
     165        
     166    } 
    107167 
    108168 
     
    117177         
    118178        esteenAse.Ammo.Value = 100; 
    119         esteenAse.FireRate = 0.5; 
    120         esteenAse.X = 55.0; 
     179        esteenAse.FireRate = 10; 
     180        esteenAse.X = 30.0; 
    121181        esteenAse.Y = -5.0; 
    122182 
     
    124184        este.Add(esteenAse); 
    125185        Add(este); 
     186 
     187        PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 
     188        tasoAivot.Speed = 50; 
     189        este.Brain = tasoAivot; 
    126190 
    127191        Timer ajastin = new Timer(); 
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli.csproj.Debug.cachefile

    r6930 r6987  
    77Content\pahis.xnb 
    88Content\ruoka.xnb 
     9Content\Uusihahmo.xnb 
     10Content\UusihahmokÀvelee.xnb 
     11Content\tautakuva.xnb 
     12Content\KuvaM.xnb 
     13Content\sydÀnsavu.xnb 
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/obj/x86/Debug/Karkuunomapeli.csproj.FileListAbsolute.txt

    r6930 r6987  
    1515C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\pahis.xnb 
    1616C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\ruoka.xnb 
     17C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\Uusihahmo.xnb 
     18C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\UusihahmokÀvelee.xnb 
     19C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\tautakuva.xnb 
     20C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\KuvaM.xnb 
     21C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\sydÀnsavu.xnb 
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/Karkuunomapeli/obj/x86/Debug/cachefile-{935D6C79-42D8-4967-8F2D-48E6CFE7CE27}-targetpath.txt

    r6930 r6987  
    77Content\pahis.xnb 
    88Content\ruoka.xnb 
     9Content\Uusihahmo.xnb 
     10Content\UusihahmokÀvelee.xnb 
     11Content\tautakuva.xnb 
     12Content\KuvaM.xnb 
     13Content\sydÀnsavu.xnb 
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/KarkuunomapeliContent/KarkuunomapeliContent.contentproj

    r6930 r6987  
    8484  </ItemGroup> 
    8585  <ItemGroup> 
     86    <Compile Include="ruoka.png"> 
     87      <Name>ruoka</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90    </Compile> 
     91  </ItemGroup> 
     92  <ItemGroup> 
     93    <Compile Include="Uusihahmokävelee.png"> 
     94      <Name>Uusihahmokävelee</Name> 
     95      <Importer>TextureImporter</Importer> 
     96      <Processor>TextureProcessor</Processor> 
     97    </Compile> 
     98  </ItemGroup> 
     99  <ItemGroup> 
     100    <Compile Include="Uusihahmo.png"> 
     101      <Name>Uusihahmo</Name> 
     102      <Importer>TextureImporter</Importer> 
     103      <Processor>TextureProcessor</Processor> 
     104    </Compile> 
     105  </ItemGroup> 
     106  <ItemGroup> 
    86107    <Compile Include="pahis.png"> 
    87108      <Name>pahis</Name> 
     
    91112  </ItemGroup> 
    92113  <ItemGroup> 
    93     <Compile Include="ruoka.png"> 
    94       <Name>ruoka</Name> 
     114    <Compile Include="tautakuva.png"> 
     115      <Name>tautakuva</Name> 
     116      <Importer>TextureImporter</Importer> 
     117      <Processor>TextureProcessor</Processor> 
     118    </Compile> 
     119  </ItemGroup> 
     120  <ItemGroup> 
     121    <Compile Include="KuvaM.png"> 
     122      <Name>KuvaM</Name> 
     123      <Importer>TextureImporter</Importer> 
     124      <Processor>TextureProcessor</Processor> 
     125    </Compile> 
     126  </ItemGroup> 
     127  <ItemGroup> 
     128    <Compile Include="sydänsavu.png"> 
     129      <Name>sydänsavu</Name> 
    95130      <Importer>TextureImporter</Importer> 
    96131      <Processor>TextureProcessor</Processor> 
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/KarkuunomapeliContent/kentta1.txt

    r6930 r6987  
    1 .......................................*...........#.......... 
    2 .......................#...*.........###...###.....######..... 
    3 *...*....######....##########......####...##*##....#........## 
    4 #...######....#...*#...#....K............##.......K#...#.*..#* 
    5 #K.......##...######...#.....###.......*##K.....####...######. 
    6 #####.....#............#..........*....##..###.......*........ 
    7 *...##...##.......#*...#K..*.....###...###..........########## 
    8 ##.......#......#####..#####...........##..............#*..... 
    9 ..#.########...........#....####...###.#####*...###########... 
    10 ...#..........#####....#...................######......#.....K 
    11 ...........*...........#........###......#.................### 
    12 ...........##........*..................*..........#####...... 
    13 .........##..#.......###.....###.......###........#....#...... 
    14 N.......##..K....#####.......*....##########...K...*...#..#### 
    15 ############################################################## 
    16 ############################################################## 
     1############U..........E...............*....E......U*.............E......*............*.......#.........E.......*.... 
     2.......................#...*.........U##...###.....######.......####...####U..........*.......E.........#...#U####### 
     3*...*....######....##########......####...##*##....#...E....##....#.............K.....#....#.##....##..UU........K..* 
     4#...######....#...*#...#....K............#U.......KU...#.*..#*..###.......*...####.......#...#K.##......K..##...##.## 
     5#K.......##...######...#.....###.......*##K.....####...####U#####.......#U##...#....#U#.......K...E.....U#........... 
     6####U.....U............#..........*....##..###.......*.K............###........E..............K..*##**..K.......K#UUU 
     7*...##...##.......#*...#K..*.....###...###..........##########.....E..K........###U######U##U########UUU#***#UUU##### 
     8##...E...#......#####..#####...........##..............#*.........######....###.....*...........*..#K...**U**....***# 
     9..#.########...........#....####...###.#####*...###########........*#......*......##U#.....###U....#K..**...***....*# 
     10...#..........###U#....#...................######......#.....K..#####.....###.........U...##.......#..***#U#.***...*# 
     11...........*...........#........###......#.............E...###......#..........#U#K..............*.#.*#.*****.***...# 
     12...........##........*.E................*E.........#####....##U....*#......*.....##.....U##......#.#..####.########## 
     13.........##..#.......###.....###.......#U#.............#.....*##....#....#####....U##..........#...##****#....***..MM 
     14N.......##K......U####.......*....##########K......*...#..####K.....E....K.........*##....####..K..#*****#....***..MM 
     15##################################################################################################################### 
     16##################################################################################################################### 
  • 2015/30/JenniN/Karkuunomapeli/Karkuunomapeli/KarkuunomapeliContent/obj/x86/Debug/ContentPipeline.xml

    r6930 r6987  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2015-07-22T14:09:03.856523+03:00</Time> 
     38      <Time>2015-07-23T14:58:55.2301835+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    6363      <Options>None</Options> 
    6464      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\pahis.xnb</Output> 
    65       <Time>2015-07-22T10:38:45.3544282+03:00</Time> 
     65      <Time>2015-07-23T11:38:42.7658114+03:00</Time> 
    6666    </Item> 
    6767    <Item> 
     
    7373      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\ruoka.xnb</Output> 
    7474      <Time>2015-07-22T10:46:25.2000282+03:00</Time> 
     75    </Item> 
     76    <Item> 
     77      <Source>Uusihahmo.png</Source> 
     78      <Name>Uusihahmo</Name> 
     79      <Importer>TextureImporter</Importer> 
     80      <Processor>TextureProcessor</Processor> 
     81      <Options>None</Options> 
     82      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\Uusihahmo.xnb</Output> 
     83      <Time>2015-07-23T11:00:12.3882667+03:00</Time> 
     84    </Item> 
     85    <Item> 
     86      <Source>Uusihahmokävelee.png</Source> 
     87      <Name>Uusihahmokävelee</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90      <Options>None</Options> 
     91      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\Uusihahmokävelee.xnb</Output> 
     92      <Time>2015-07-23T09:58:05.0976667+03:00</Time> 
     93    </Item> 
     94    <Item> 
     95      <Source>tautakuva.png</Source> 
     96      <Name>tautakuva</Name> 
     97      <Importer>TextureImporter</Importer> 
     98      <Processor>TextureProcessor</Processor> 
     99      <Options>None</Options> 
     100      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\tautakuva.xnb</Output> 
     101      <Time>2015-07-23T12:43:39.0395835+03:00</Time> 
     102    </Item> 
     103    <Item> 
     104      <Source>KuvaM.png</Source> 
     105      <Name>KuvaM</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\KuvaM.xnb</Output> 
     110      <Time>2015-07-23T14:08:06.7921835+03:00</Time> 
     111    </Item> 
     112    <Item> 
     113      <Source>sydänsavu.png</Source> 
     114      <Name>sydänsavu</Name> 
     115      <Importer>TextureImporter</Importer> 
     116      <Processor>TextureProcessor</Processor> 
     117      <Options>None</Options> 
     118      <Output>C:\MyTemp\JenniN\Karkuunomapeli\Karkuunomapeli\Karkuunomapeli\bin\x86\Debug\Content\sydänsavu.xnb</Output> 
     119      <Time>2015-07-23T14:57:41.6347835+03:00</Time> 
    75120    </Item> 
    76121    <BuildSuccessful>true</BuildSuccessful> 
Note: See TracChangeset for help on using the changeset viewer.