Changeset 2308 for 2011/26


Ignore:
Timestamp:
2011-06-29 14:49:39 (12 years ago)
Author:
rolipark
Message:

Talletus.

Location:
2011/26/RoosaP
Files:
10 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWay/FindTheWay.csproj.Debug.cachefile

    r2235 r2308  
     1Content\kukkanen.xnb 
     2Content\perhonen.xnb 
     3Content\leppis.xnb 
     4Content\kaveri.xnb 
    15kentta.txt 
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWay/Peli.cs

    r2235 r2308  
    1111    PhysicsObject leppis; 
    1212 
     13    Image kaveriKuva = LoadImage("kaveri"); 
     14        
     15    Image kukkaKuva = LoadImage("kukkanen"); 
     16 
     17    Image leppisKuva = LoadImage("leppis"); 
     18 
     19    Image perhonenKuva = LoadImage("perhonen"); 
     20 
     21    
     22 
    1323    public override void Begin() 
    1424    { 
    15  
    1625 
    1726        Keyboard.Listen(Key.Left, ButtonState.Down, 
     
    2332        Keyboard.Listen(Key.Down, ButtonState.Down, 
    2433          LiikutaPelaajaa, null, new Vector(0, -1000)); 
     34        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); 
    2535 
    2636 
    2737        // TODO: Kirjoita ohjelmakoodisi tähän 
    2838 
    29         leppis = new PhysicsObject(40, 40); 
     39        leppis = new PhysicsObject(60, 60); 
    3040        leppis.Shape = Shape.Circle; 
    3141        leppis.Color = Color.Red; 
    32         leppis.X = 0.0; 
    33         leppis.Y = 0.0; 
     42        leppis.X = -1750.0; 
     43        leppis.Y = 800.0; 
     44        leppis.Image = leppisKuva; 
    3445        Add(leppis); 
    3546 
    36         Level.BackgroundColor = Color.Green; 
     47        Level.BackgroundColor = Color.LightBlue; 
    3748 
    38         Gravity = new Vector(0.0, -800.0); 
     49        Gravity = new Vector(0.0, -500.0); 
    3950 
    40         Level.CreateBorders(); 
    4151 
     52        TileMap ruudut = TileMap.FromFile("kentta.txt"); 
     53 
     54        ruudut.SetTileMethod('#', LuoTaso); 
     55        ruudut.SetTileMethod('k', LuoKukka); 
     56        ruudut.SetTileMethod('p', LuoPerhonen); 
     57        ruudut.SetTileMethod('K', LuoKaveri); 
     58        ruudut.SetTileMethod('2' LuoKukka2); 
     59        ruudut.Execute(90, 90); 
     60        Camera.ZoomToLevel(); 
    4261     } 
    4362 
     
    4766    } 
    4867 
    49      
     68    void LuoTaso(Vector paikka, double leveys, double korkeus) 
     69    { 
     70        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus);   
     71        taso.Position = paikka; 
     72        taso.Shape = Shape.Rectangle; 
     73        taso.Color = Color.ForestGreen; 
     74        Add(taso); 
     75    } 
     76 
     77    void LuoKukka(Vector paikka, double leveys, double korkeus) 
     78    { 
     79        PhysicsObject kukka = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     80        kukka.Position = paikka; 
     81        kukka.Shape = Shape.Rectangle; 
     82        kukka.Color = Color.Magenta; 
     83        kukka.Image = kukkaKuva; 
     84        Add(kukka); 
     85    } 
     86 
     87    void LuoPerhonen(Vector paikka, double leveys, double korkeus) 
     88    { 
     89        PhysicsObject perhonen = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     90        perhonen.Position = paikka; 
     91        perhonen.Shape = Shape.Octagon; 
     92        perhonen.Color = Color.Blue; 
     93        perhonen.Image = perhonenKuva; 
     94        Add(perhonen); 
     95 
     96    } 
     97 
     98    void LuoKaveri(Vector paikka, double leveys, double korkeus) 
     99    { 
     100        PhysicsObject kaveri = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     101        kaveri.Position = paikka; 
     102        kaveri.Shape = Shape.Circle; 
     103        kaveri.Color = Color.Red; 
     104        kaveri.Image = kaveriKuva; 
     105        Add(kaveri); 
     106 
     107    } 
     108 
     109    void LuoKukka2(Vector paikka, double leveys, double korkeus) 
     110    { 
     111        PhysicsObject kukka2 = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     112        kukka2.Position = paikka; 
     113        kukka2.Shape = Shape.Rectangle;  
     114 
     115    } 
    50116} 
     117 
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWay/bin/x86/Debug/kentta.txt

    r2235 r2308  
    11########################################## 
    2 #              p                   p    # 
     2#             p                   p pp p # 
    33#                                        # 
    4        k         k    k               # 
    5 ################################         # 
    6 # p                 p           p        # 
     4L    k  k         kkkkkkk             # 
     5#################################        # 
     6# p p               p           p        # 
    77#                                        # 
    88#                                        # 
    9 #           k  k         k           k  # 
    10 #         ################################ 
    11 #         p         p    p            p # 
     9#           k k k k      k           k k # 
     10#       p################################# 
     11#         p     pp       p           p p # 
    1212#                                        # 
    1313#                                        # 
    14 # k            k              k          # 
    15 ################################         # 
    16 #         p     p        p               # 
     14# k k k k       k            k           # 
     15#################################        # 
     16#             p     p      p p        ppp# 
    1717#                                        # 
    1818#                                        # 
    19 #                   k           k     k # 
     19# K     kk          kkkkk      k k     k # 
    2020########################################## 
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWay/kentta.txt

    r2235 r2308  
    11########################################## 
    2 #              p                   p    # 
     2#             p                   p pp p # 
    33#                                        # 
    4        k         k    k               # 
    5 ################################         # 
    6 # p                 p           p        # 
     4L    k  k         kkkkkkk             # 
     5#################################        # 
     6# p p               p           p        # 
    77#                                        # 
    88#                                        # 
    9 #           k  k         k           k  # 
    10 #         ################################ 
    11 #         p         p    p            p # 
     9#           k k k k      k           k k # 
     10#       p################################# 
     11#         p     pp       p           p p # 
    1212#                                        # 
    1313#                                        # 
    14 # k            k              k          # 
    15 ################################         # 
    16 #         p     p        p               # 
     14# k k k k       k            k           # 
     15#################################        # 
     16#             p     p      p p        ppp# 
    1717#                                        # 
    1818#                                        # 
    19 #                   k           k     k # 
     19# K     kk          kkkkk      k k     k # 
    2020########################################## 
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWay/obj/x86/Debug/FindTheWay.csproj.FileListAbsolute.txt

    r2235 r2308  
    88C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\obj\x86\Debug\FindTheWay.pdb 
    99C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\kentta.txt 
     10C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\kukkanen.xnb 
     11C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\perhonen.xnb 
     12C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\leppis.xnb 
     13C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\kaveri.xnb 
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWayContent/FindTheWayContent.contentproj

    r2235 r2308  
    4242    </Reference> 
    4343  </ItemGroup> 
     44  <ItemGroup> 
     45    <Compile Include="kukkanen.png"> 
     46      <Name>kukkanen</Name> 
     47      <Importer>TextureImporter</Importer> 
     48      <Processor>TextureProcessor</Processor> 
     49    </Compile> 
     50    <Compile Include="perhonen.png"> 
     51      <Name>perhonen</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54    </Compile> 
     55  </ItemGroup> 
     56  <ItemGroup> 
     57    <Compile Include="leppis.png"> 
     58      <Name>leppis</Name> 
     59      <Importer>TextureImporter</Importer> 
     60      <Processor>TextureProcessor</Processor> 
     61    </Compile> 
     62  </ItemGroup> 
     63  <ItemGroup> 
     64    <Compile Include="kaveri.png"> 
     65      <Name>kaveri</Name> 
     66      <Importer>TextureImporter</Importer> 
     67      <Processor>TextureProcessor</Processor> 
     68    </Compile> 
     69  </ItemGroup> 
    4470  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4571  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2011/26/RoosaP/FindTheWay/FindTheWay/FindTheWayContent/obj/x86/Debug/ContentPipeline.xml

    r2235 r2308  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>kukkanen.png</Source> 
     6      <Name>kukkanen</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\kukkanen.xnb</Output> 
     11      <Time>2011-06-29T12:05:05.373456+03:00</Time> 
     12    </Item> 
     13    <Item> 
     14      <Source>perhonen.png</Source> 
     15      <Name>perhonen</Name> 
     16      <Importer>TextureImporter</Importer> 
     17      <Processor>TextureProcessor</Processor> 
     18      <Options>None</Options> 
     19      <Output>C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\perhonen.xnb</Output> 
     20      <Time>2011-06-29T12:27:05.9756578+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>leppis.png</Source> 
     24      <Name>leppis</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\leppis.xnb</Output> 
     29      <Time>2011-06-29T13:23:31.5129501+03:00</Time> 
     30    </Item> 
     31    <Item> 
     32      <Source>kaveri.png</Source> 
     33      <Name>kaveri</Name> 
     34      <Importer>TextureImporter</Importer> 
     35      <Processor>TextureProcessor</Processor> 
     36      <Options>None</Options> 
     37      <Output>C:\MyTemp\RoosaP\FindTheWay\FindTheWay\FindTheWay\bin\x86\Debug\Content\kaveri.xnb</Output> 
     38      <Time>2011-06-29T13:36:48.3305497+03:00</Time> 
     39    </Item> 
    440    <BuildSuccessful>true</BuildSuccessful> 
    541    <Settings> 
     
    1551    <Assemblies> 
    1652      <Assembly> 
     53        <Key>C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     54        <Value>2010-08-23T12:41:18+03:00</Value> 
     55      </Assembly> 
     56      <Assembly> 
     57        <Key>C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     58        <Value>2010-08-23T12:41:18+03:00</Value> 
     59      </Assembly> 
     60      <Assembly> 
     61        <Key>C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     62        <Value>2010-08-23T12:41:18+03:00</Value> 
     63      </Assembly> 
     64      <Assembly> 
     65        <Key>C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     66        <Value>2010-08-23T12:41:18+03:00</Value> 
     67      </Assembly> 
     68      <Assembly> 
     69        <Key>C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     70        <Value>2010-08-23T12:41:18+03:00</Value> 
     71      </Assembly> 
     72      <Assembly> 
     73        <Key>C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     74        <Value>2010-08-23T12:41:18+03:00</Value> 
     75      </Assembly> 
     76      <Assembly> 
    1777        <Key>C:\WINNT\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    1878        <Value>2011-06-01T13:47:00.9222943+03:00</Value> 
Note: See TracChangeset for help on using the changeset viewer.