Changeset 4071 for 2013/24


Ignore:
Timestamp:
2013-06-11 14:56:53 (10 years ago)
Author:
joalerho
Message:

Talletus.

Location:
2013/24/JoonasE/Mastermind/Mastermind
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2013/24/JoonasE/Mastermind/Mastermind/Mastermind/Mastermind.cs

    r4065 r4071  
    1616    PlatformCharacter pelaaja2; 
    1717 
    18  
     18    Animation pelaajanKuva2; 
    1919    Animation pelaajanKuva; 
    2020    Image tahtiKuva = LoadImage("tahti"); 
     21    Image maa = LoadImage("block"); 
    2122 
    2223    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    2425    public override void Begin() 
    2526    { 
     27        pelaajanKuva2 = LoadAnimation("stillblue"); 
    2628        pelaajanKuva = LoadAnimation("still"); 
    2729 
     
    3133        LisaaNappaimet(); 
    3234 
    33         Camera.Follow(pelaaja1); 
    34         Camera.ZoomFactor = 1.2; 
    35         Camera.StayInLevel = true; 
     35        Camera.Follow(pelaaja1, pelaaja2); 
     36        
    3637    } 
    3738 
     
    4445        pelaaja2 = new PlatformCharacter(1, 1); 
    4546        kentta.SetTileMethod('A', LisaaPelaaja); 
    46         //kentta.SetTileMethod('B', LisaaPelaaja2); 
     47        kentta.SetTileMethod('B', LisaaPelaaja2); 
    4748        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4849        Level.CreateBorders(); 
    49         Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     50        Level.Background.CreateGradient(Color.BloodRed, Color.Blue); 
    5051    } 
    5152 
     
    5556        taso.Position = paikka; 
    5657        taso.Color = Color.Green; 
     58        taso.Image = maa; 
    5759        Add(taso); 
    5860    } 
     
    7779        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
    7880        Add(pelaaja1); 
     81    } 
     82 
     83    void LisaaPelaaja2(Vector paikka, double leveys, double korkeus) //, PlatformCharacter pelaaja, Animation paikallaan, Animation kavely) 
     84    { 
     85        pelaaja2 = new PlatformCharacter(leveys * 0.8, korkeus * 0.8); 
     86        pelaaja2.Position = paikka; 
     87        pelaaja2.Mass = 4.0; 
     88        pelaaja2.Animation = pelaajanKuva2; 
     89        pelaaja2.Animation.Start(); 
     90        AddCollisionHandler(pelaaja2, "tahti", TormaaTahteen); 
     91        Add(pelaaja2); 
    7992    } 
    8093    
  • 2013/24/JoonasE/Mastermind/Mastermind/MastermindContent/MastermindContent.contentproj

    r4065 r4071  
    7474    </Compile> 
    7575  </ItemGroup> 
     76  <ItemGroup> 
     77    <Compile Include="block.png"> 
     78      <Name>block</Name> 
     79      <Importer>TextureImporter</Importer> 
     80      <Processor>TextureProcessor</Processor> 
     81    </Compile> 
     82    <Compile Include="Danger block.png"> 
     83      <Name>Danger block</Name> 
     84      <Importer>TextureImporter</Importer> 
     85      <Processor>TextureProcessor</Processor> 
     86    </Compile> 
     87  </ItemGroup> 
     88  <ItemGroup> 
     89    <Compile Include="stillblue.anim"> 
     90      <Name>stillblue</Name> 
     91      <Importer>AnimationImporter</Importer> 
     92      <Processor>AnimationContentProcessor</Processor> 
     93    </Compile> 
     94  </ItemGroup> 
    7695  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    7796  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2013/24/JoonasE/Mastermind/Mastermind/MastermindContent/kentta1.txt

    r4065 r4071  
    1 ################################ 
    2 #                  # 
    3 #     N    *       # 
    4 #################### 
     1####################################################################################### 
     2#                                #                                                    # 
     3#                                #     #                                                    # 
     4#                          #     #           #   #   #   #                            # 
     5#    B     ####            #                 #   #   #   #                            # 
     6####################################################################################### 
     7#                   ###                      #   #   #   #                            # 
     8#                                            #   #   #   #                            # 
     9#        #          #  #####                                                          # 
     10#    A   #          #  #   #                                                          # 
     11####################################################################################### 
Note: See TracChangeset for help on using the changeset viewer.