Changeset 6910


Ignore:
Timestamp:
2015-07-22 11:48:27 (8 years ago)
Author:
elalhutt
Message:

peli

Location:
2015/30/EliasHu/RescueRanger
Files:
41 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/RescueRanger.cs

    r6868 r6910  
    1717    int kenttanumero = 1; 
    1818 
     19     
     20    IntMeter pisteLaskuri2; 
     21 
    1922    PlatformCharacter pelaaja1; 
    2023 
     24 
     25    Image tukki = LoadImage("log"); 
     26    Image lehti = LoadImage("leaf"); 
    2127    Image taustaKuva = LoadImage("america"); 
    2228    Image pelaajanKuva = LoadImage("mediheli"); 
    2329    Image tahtiKuva = LoadImage("tahti"); 
     30    Image elain = LoadImage("elain"); 
     31    Image ranger = LoadImage("ranger"); 
    2432 
    2533    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    2735    public override void Begin() 
    2836    { 
     37        pisteLaskuri2 = new IntMeter(0); 
    2938        aloitapeli(); 
    3039    } 
     
    3645 
    3746        LuoPisteLaskuri(); 
     47        LuoPistelaskuri2(); 
    3848        LuoKentta(); 
    3949        LisaaNappaimet(); 
     
    5060        TileMap kentta = TileMap.FromLevelAsset("kentta"+kenttanumero); 
    5161        kentta.SetTileMethod('#', LisaaTaso); 
     62        kentta.SetTileMethod('i', LisaaTaso2); 
    5263        kentta.SetTileMethod('*', LisaaElain); 
    5364        kentta.SetTileMethod('=', LisaaTurva); 
    5465        kentta.SetTileMethod('N', LisaaPelaaja); 
    5566        kentta.SetTileMethod('t', LisaaMaali); 
     67        kentta.SetTileMethod('u', LisaaTalo); 
     68        kentta.SetTileMethod('r', LisaaRanger); 
    5669        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    5770        Level.CreateBorders(); 
     
    7083        taso.Position = paikka; 
    7184        taso.Color = Color.Green; 
     85        taso.Image = lehti; 
    7286        taso.Tag = "Puu"; 
    7387        Add(taso); 
    7488    } 
     89 
     90    void LisaaTaso2(Vector paikka, double leveys, double korkeus) 
     91    { 
     92        GameObject taso2 = new GameObject(leveys, korkeus); 
     93        taso2.Position = paikka; 
     94         taso2.Image = lehti; 
     95        Add(taso2); 
     96    } 
     97 
     98    void LisaaRanger(Vector paikka, double leveys, double korkeus) 
     99    { 
     100        GameObject ranger = new GameObject(leveys, korkeus); 
     101        ranger.Position = paikka; 
     102         ranger.Image = ranger; 
     103        Add(ranger); 
     104    } 
     105 
     106 
     107    void LisaaTalo(Vector paikka, double leveys, double korkeus) 
     108    { 
     109        PhysicsObject talo = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     110        talo.Position = paikka; 
     111        talo.Image = tukki; 
     112        talo.Tag = "Puu"; 
     113        Add(talo); 
     114 
     115    } 
     116 
    75117 
    76118    void LisaaTurva(Vector paikka, double leveys, double korkeus) 
     
    96138        Elain.IgnoresCollisionResponse = true; 
    97139        Elain.Position = paikka; 
    98         Elain.Image = tahtiKuva; 
     140        Elain.Image = elain; 
    99141        Elain.Tag = "Elain"; 
    100142        Add(Elain); 
     
    155197        if (pistelaskuri.Value == pistelaskuri.MaxValue) 
    156198        { 
     199             
    157200            kenttanumero++; 
    158201            aloitapeli(); 
     
    161204    void TormaaPuuhun(PhysicsObject hahmo, PhysicsObject Puu) 
    162205    { 
     206        pisteLaskuri2.Value += 1; 
    163207        aloitapeli(); 
    164208    } 
     209 
    165210    void LuoPisteLaskuri() 
    166211    { 
    167212        pistelaskuri = new IntMeter(0); 
    168213 
    169         pisteNaytto = new Label(); 
     214        pisteNaytto = new Label(""); 
    170215        pisteNaytto.X = Screen.Left + 100; 
    171216        pisteNaytto.Y = Screen.Top - 100; 
    172217        pisteNaytto.TextColor = Color.Black; 
    173218        pisteNaytto.Color = Color.White; 
     219        pisteNaytto.Title = "eläimet"; 
    174220 
    175221        pisteNaytto.BindTo(pistelaskuri); 
     
    177223    } 
    178224 
    179  
    180  
     225   void LuoPistelaskuri2() 
     226    { 
     227         
     228 
     229        Label pisteNaytto2 = new Label(); 
     230        pisteNaytto2.X = Screen.Right - 100; 
     231        pisteNaytto2.Y = Screen.Top - 100; 
     232        pisteNaytto2.TextColor = Color.Black; 
     233        pisteNaytto2.Color = Color.White; 
     234        pisteNaytto2.Title = "yritykset"; 
     235        pisteNaytto2.IntFormatString = ": {0:D3}"; 
     236 
     237 
     238        pisteNaytto2.BindTo(pisteLaskuri2); 
     239        Add(pisteNaytto2); 
     240    } 
    181241 
    182242} 
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/RescueRanger.csproj.Debug.cachefile

    r6868 r6910  
    99Content\Junge.xnb 
    1010Content\america.xnb 
     11Content\leaf.xnb 
     12Content\log.xnb 
     13Content\elain.xnb 
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/obj/x86/Debug/RescueRanger.csproj.FileListAbsolute.txt

    r6868 r6910  
    1717C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\Junge.xnb 
    1818C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\america.xnb 
     19C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\leaf.xnb 
     20C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\log.xnb 
     21C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\elain.xnb 
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/obj/x86/Debug/cachefile-{D77DA1D7-8701-41C1-98B2-08AF5C040485}-targetpath.txt

    r6868 r6910  
    99Content\Junge.xnb 
    1010Content\america.xnb 
     11Content\leaf.xnb 
     12Content\log.xnb 
     13Content\elain.xnb 
     14Content\ranger.xnb 
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRangerContent/RescueRangerContent.contentproj

    r6868 r6910  
    109109    </Compile> 
    110110  </ItemGroup> 
     111  <ItemGroup> 
     112    <Compile Include="leaf.png"> 
     113      <Name>leaf</Name> 
     114      <Importer>TextureImporter</Importer> 
     115      <Processor>TextureProcessor</Processor> 
     116    </Compile> 
     117  </ItemGroup> 
     118  <ItemGroup> 
     119    <Compile Include="log.png"> 
     120      <Name>log</Name> 
     121      <Importer>TextureImporter</Importer> 
     122      <Processor>TextureProcessor</Processor> 
     123    </Compile> 
     124  </ItemGroup> 
     125  <ItemGroup> 
     126    <Compile Include="elain.png"> 
     127      <Name>elain</Name> 
     128      <Importer>TextureImporter</Importer> 
     129      <Processor>TextureProcessor</Processor> 
     130    </Compile> 
     131  </ItemGroup> 
     132  <ItemGroup> 
     133    <Compile Include="ranger.png"> 
     134      <Name>ranger</Name> 
     135      <Importer>TextureImporter</Importer> 
     136      <Processor>TextureProcessor</Processor> 
     137    </Compile> 
     138  </ItemGroup> 
    111139  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    112140  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRangerContent/kentta1.txt

    r6868 r6910  
    1 ######################               ##############            ########### 
    2              ########                                               ###### 
    3               ######                                                 ##### 
    4                ####      #########                   ####            ##### 
    5                 ##      #############             #########           #### 
    6                 ##     ###############         ##############         #### 
    7      N          ##     ######################################          ### 
    8  tttttttt  #    ##     ############              ########               ## 
    9           ##     #         ####                    ###                  ## 
    10          ###               ####                                        ### 
    11          ###               ####         *                              ### 
    12              ###               ####       =====                           #### 
    13          #####             ####                                   ######## 
    14          #######           ####                    ###        ############ 
    15 ########################################################################## 
     1#######################               #############             ########### 
     2#             ########                                               ###### 
     3#              ######                                                 ##### 
     4#               ####      #########                  #####            ##### 
     5#                ##      ##iiiiiiii###             #iiiii###           #### 
     6#                ##     ###iiiiiiii####         ####iiiii#####         #### 
     7#     N          ##     ###iiiiiiii#################iiiii#####          ### 
     8# tttttttt  #    ##     ############              ##iiiii#               ## 
     9#          ##     #         uuuu                    uuu #                ## 
     10#         ###               uuuu                                        ### 
     11#         ###               uuuu         *                              ### 
     12#         ###               uuuu       =====                           #### 
     13#         #####             uuuu                                   ######## 
     14#         #######           uuuu                    uuu        ############ 
     15########################################################################### 
  • 2015/30/EliasHu/RescueRanger/RescueRanger/RescueRangerContent/obj/x86/Debug/ContentPipeline.xml

    r6868 r6910  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2015-07-21T14:52:17.7882593+03:00</Time> 
     38      <Time>2015-07-22T10:49:38.6544744+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    9292      <Time>2015-07-21T14:45:48.2870249+03:00</Time> 
    9393    </Item> 
     94    <Item> 
     95      <Source>leaf.png</Source> 
     96      <Name>leaf</Name> 
     97      <Importer>TextureImporter</Importer> 
     98      <Processor>TextureProcessor</Processor> 
     99      <Options>None</Options> 
     100      <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\leaf.xnb</Output> 
     101      <Time>2015-07-22T10:07:17.0513623+03:00</Time> 
     102    </Item> 
     103    <Item> 
     104      <Source>log.png</Source> 
     105      <Name>log</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\log.xnb</Output> 
     110      <Time>2015-07-22T10:16:44.5829617+03:00</Time> 
     111    </Item> 
     112    <Item> 
     113      <Source>elain.png</Source> 
     114      <Name>elain</Name> 
     115      <Importer>TextureImporter</Importer> 
     116      <Processor>TextureProcessor</Processor> 
     117      <Options>None</Options> 
     118      <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\elain.xnb</Output> 
     119      <Time>2015-07-22T11:25:07.7507875+03:00</Time> 
     120    </Item> 
     121    <Item> 
     122      <Source>ranger.png</Source> 
     123      <Name>ranger</Name> 
     124      <Importer>TextureImporter</Importer> 
     125      <Processor>TextureProcessor</Processor> 
     126      <Options>None</Options> 
     127      <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\ranger.xnb</Output> 
     128      <Time>2015-07-22T11:39:10.2631684+03:00</Time> 
     129    </Item> 
    94130    <BuildSuccessful>true</BuildSuccessful> 
    95131    <Settings> 
Note: See TracChangeset for help on using the changeset viewer.