Ignore:
Timestamp:
2010-07-08 14:14:52 (11 years ago)
Author:
vekakart
Message:

Lisäsin viholliset ja joni päivitti kentän

Location:
2010/27/Vekakart/Catch The Rainbow/Catch The Rainbow
Files:
14 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • 2010/27/Vekakart/Catch The Rainbow/Catch The Rainbow/Catch The Rainbow.csproj

    r1171 r1186  
    8989  </ItemGroup> 
    9090  <ItemGroup> 
     91    <Content Include="Crossword_hand.png"> 
     92      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     93    </Content> 
    9194    <Content Include="Game.ico" /> 
    9295    <Content Include="GameThumbnail.png" /> 
    93     <Content Include="Kentta1.txt"> 
    94       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    95     </Content> 
     96    <Resource Include="Kentta 1.txt"> 
     97      <CopyToOutputDirectory>Always</CopyToOutputDirectory> 
     98    </Resource> 
    9699    <Content Include="Max Mechanic.png"> 
    97100      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
  • 2010/27/Vekakart/Catch The Rainbow/Catch The Rainbow/Content/Content.contentproj

    r1114 r1186  
    1 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> 
     1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> 
    22  <PropertyGroup> 
    33    <ProjectGuid>d7cd8561-6f1e-412b-8a0e-ce4733215a3a</ProjectGuid> 
     
    3434    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d" /> 
    3535  </ItemGroup> 
     36  <ItemGroup> 
     37    <Compile Include="Crossword2.png"> 
     38      <Name>Crossword2</Name> 
     39      <Importer>TextureImporter</Importer> 
     40      <Processor>TextureProcessor</Processor> 
     41    </Compile> 
     42  </ItemGroup> 
    3643</Project> 
  • 2010/27/Vekakart/Catch The Rainbow/Catch The Rainbow/Peli.cs

    r1171 r1186  
    1111 
    1212    Vector NopeusEteen = new Vector(200, 0); 
     13 
     14    PhysicsObject Crossword; 
    1315 
    1416    PlatformCharacter Max; 
     
    2527        Camera.FollowedObject = Max; 
    2628 
    27         TileMap ruudut = TileMap.FromFile("Kentta1.txt"); 
     29        TileMap ruudut = TileMap.FromFile("Kentta 1.txt"); 
    2830        ruudut ['='] = LuoPalikka; 
    2931        ruudut['C'] = LuoRainbow; 
     32        ruudut['J'] = LuoCrossword; 
    3033        ruudut.Insert(ruudunleveys, ruudunkorkeus); 
    3134 
     
    9295        Max.Jump(1000); 
    9396    } 
     97    PhysicsObject LuoCrossword() 
     98    { 
     99        Crossword = new PhysicsObject(35.0, 45.0); 
     100        Crossword.Image = Image.FromFile("Crossword_hand.png"); 
     101 
     102        Timer ajastin = new Timer(); 
     103        ajastin.Tag = Crossword; 
     104        ajastin.Interval = 1; 
     105        ajastin.Trigger += Tekoaly; 
     106        Add (ajastin); 
     107        ajastin.Start(); 
     108        return Crossword; 
     109    } 
     110    void Tekoaly(Timer sender) 
     111    { 
     112        PhysicsObject vihollinen = (PhysicsObject)sender.Tag; 
     113        double etaisyys = vihollinen.X - Max.X; 
     114        if (etaisyys < 0) 
     115        { 
     116            etaisyys = etaisyys * -1; 
     117        } 
     118        if (etaisyys < 150) 
     119        { 
     120            vihollinen.Image = LoadImage("Crossword2"); 
     121        } 
     122        sender.Start(); 
     123    } 
     124 
    94125} 
Note: See TracChangeset for help on using the changeset viewer.