Changeset 7198 for 2016


Ignore:
Timestamp:
2016-06-07 19:48:34 (7 years ago)
Author:
sieerinn
Message:

Varjostinohjelmakikkailua

Location:
2016/23/ohjaajat/Punasininen/Punasininen
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2016/23/ohjaajat/Punasininen/Punasininen/Punasininen/Punasininen.cs

    r7197 r7198  
    1818    private Image bluepic; 
    1919    private Image redpic; 
     20    DoubleMeter percentageTracker; 
    2021 
    21     DoubleMeter percentageTracker; 
     22    private Shader shader; 
    2223 
    2324    public override void Begin() 
    2425    { 
     26        IsMouseVisible = true; // <- voi ottaa pois 
     27        shader = new Shader(GraphicsDevice, Content, Camera); 
     28 
    2529        //Gravity = new Vector(0, -1000); 
    2630        CreateLevel(); 
     
    139143        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Ohjeet"); 
    140144        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta"); 
     145 
     146        Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () => shader.NewWave(Mouse.PositionOnWorld), null); 
    141147    } 
    142148 
     
    159165    } 
    160166 
     167    protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime) 
     168    { 
     169        //shader.Draw(gameTime, base.Draw); 
    161170 
     171        shader.Draw(gameTime); 
     172        base.Draw(gameTime); 
     173        shader.DrawEnd(gameTime); 
     174    } 
    162175} 
  • 2016/23/ohjaajat/Punasininen/Punasininen/Punasininen/Punasininen.csproj

    r7184 r7198  
    1414    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion> 
    1515    <XnaPlatform>Windows</XnaPlatform> 
    16     <XnaProfile>Reach</XnaProfile> 
     16    <XnaProfile>HiDef</XnaProfile> 
    1717    <XnaCrossPlatformGroupID>f540c567-72a8-4eab-bbcb-52fdfdf661a1</XnaCrossPlatformGroupID> 
    1818    <XnaOutputType>Game</XnaOutputType> 
     
    115115    <Compile Include="Punasininen.cs" /> 
    116116    <Compile Include="Properties\AssemblyInfo.cs" /> 
     117    <Compile Include="Shader.cs" /> 
     118    <Compile Include="WeaponCrate.cs" /> 
    117119  </ItemGroup> 
    118120  <ItemGroup> 
  • 2016/23/ohjaajat/Punasininen/Punasininen/PunasininenContent/PunasininenContent.contentproj

    r7182 r7198  
    5252    </Compile> 
    5353  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="Shockwave.fx"> 
     56      <Name>Shockwave</Name> 
     57      <Importer>EffectImporter</Importer> 
     58      <Processor>EffectProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
    5461  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    5562  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.