Changeset 3745 for 2012/30


Ignore:
Timestamp:
2012-07-25 14:59:05 (11 years ago)
Author:
tuoswell
Message:

Talletus.

Location:
2012/30/TuomasW
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • 2012/30/TuomasW/Mortal Rally/Mortal Rally.sln

    r3723 r3745  
    22Microsoft Visual Studio Solution File, Format Version 11.00 
    33# Visual Studio 2010 
    4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mortal Rally", "Mortal Rally\Mortal Rally\Mortal Rally.csproj", "{50FD6200-8AE6-43B3-B1FC-3F2C5C23613D}" 
     4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mortal Rally", "Mortal Rally\Mortal Rally\Mortal Rally.csproj", "{F9453C44-F979-4A31-93B2-74290E7EC9A8}" 
    55EndProject 
    6 Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "Mortal RallyContent", "Mortal Rally\Mortal RallyContent\Mortal RallyContent.contentproj", "{0C926CB7-16EA-47E0-8B3B-CB5F034F2CF1}" 
     6Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "Mortal RallyContent", "Mortal Rally\Mortal RallyContent\Mortal RallyContent.contentproj", "{53AC2457-D3C9-4FFA-95CC-C8936BFC2918}" 
    77EndProject 
    88Global 
     
    1212        EndGlobalSection 
    1313        GlobalSection(ProjectConfigurationPlatforms) = postSolution 
    14                 {50FD6200-8AE6-43B3-B1FC-3F2C5C23613D}.Debug|x86.ActiveCfg = Debug|x86 
    15                 {50FD6200-8AE6-43B3-B1FC-3F2C5C23613D}.Debug|x86.Build.0 = Debug|x86 
    16                 {50FD6200-8AE6-43B3-B1FC-3F2C5C23613D}.Release|x86.ActiveCfg = Release|x86 
    17                 {50FD6200-8AE6-43B3-B1FC-3F2C5C23613D}.Release|x86.Build.0 = Release|x86 
    18                 {0C926CB7-16EA-47E0-8B3B-CB5F034F2CF1}.Debug|x86.ActiveCfg = Debug|x86 
    19                 {0C926CB7-16EA-47E0-8B3B-CB5F034F2CF1}.Release|x86.ActiveCfg = Release|x86 
     14                {F9453C44-F979-4A31-93B2-74290E7EC9A8}.Debug|x86.ActiveCfg = Debug|x86 
     15                {F9453C44-F979-4A31-93B2-74290E7EC9A8}.Debug|x86.Build.0 = Debug|x86 
     16                {F9453C44-F979-4A31-93B2-74290E7EC9A8}.Release|x86.ActiveCfg = Release|x86 
     17                {F9453C44-F979-4A31-93B2-74290E7EC9A8}.Release|x86.Build.0 = Release|x86 
     18                {53AC2457-D3C9-4FFA-95CC-C8936BFC2918}.Debug|x86.ActiveCfg = Debug|x86 
     19                {53AC2457-D3C9-4FFA-95CC-C8936BFC2918}.Release|x86.ActiveCfg = Release|x86 
    2020        EndGlobalSection 
    2121        GlobalSection(SolutionProperties) = preSolution 
  • 2012/30/TuomasW/Mortal Rally/Mortal Rally/Mortal Rally/Mortal Rally.csproj

    r3723 r3745  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    33  <PropertyGroup> 
    4     <ProjectGuid>{50FD6200-8AE6-43B3-B1FC-3F2C5C23613D}</ProjectGuid> 
     4    <ProjectGuid>{F9453C44-F979-4A31-93B2-74290E7EC9A8}</ProjectGuid> 
    55    <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 
    66    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
     
    1515    <XnaPlatform>Windows</XnaPlatform> 
    1616    <XnaProfile>Reach</XnaProfile> 
    17     <XnaCrossPlatformGroupID>492979c9-e0e6-4c30-8a5c-2c12b45cceb8</XnaCrossPlatformGroupID> 
     17    <XnaCrossPlatformGroupID>1eeda31b-3812-4bd3-9b6d-d496232dc027</XnaCrossPlatformGroupID> 
    1818    <XnaOutputType>Game</XnaOutputType> 
    1919    <ApplicationIcon>Game.ico</ApplicationIcon> 
     
    120120  </ItemGroup> 
    121121  <ItemGroup> 
    122     <ProjectReference Include="..\Mortal_RallyContent\Mortal_RallyContent.contentproj"> 
    123       <Name>Mortal_RallyContent</Name> 
     122    <ProjectReference Include="..\Mortal RallyContent\Mortal RallyContent.contentproj"> 
     123      <Project>{53AC2457-D3C9-4FFA-95CC-C8936BFC2918}</Project> 
     124      <Name>Mortal RallyContent %28Content%29</Name> 
    124125      <XnaReferenceType>Content</XnaReferenceType> 
    125126    </ProjectReference> 
  • 2012/30/TuomasW/Mortal Rally/Mortal Rally/Mortal Rally/Mortal_Rally.cs

    r3723 r3745  
    77using Jypeli.Widgets; 
    88 
    9 public class Mortal_Rally : PhysicsGame 
     9public class Mortal_Rally : TopDownPhysicsGame 
    1010{ 
     11     
     12 
     13    Image taustaKuva = LoadImage("rata"); 
     14 
     15 
     16    Automobile auto; 
     17    Automobile auto2; 
     18 
    1119    public override void Begin() 
    1220    { 
    13         // TODO: Kirjoita ohjelmakoodisi tähän 
     21        Level.CreateBorders(1, true); 
     22        Camera.ZoomToLevel(); 
     23 
     24        Level.Background.Image = taustaKuva; 
     25        Level.BackgroundColor = Color.Green; 
    1426 
    1527        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    1628        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     29 
     30 
     31        //PhysicsObject aita = new PhysicsObject(LoadImage("aidat")); 
     32        //Add(aita); 
     33 
     34 
     35       auto = LuoAuto(Level.Left + 20, 0); 
     36       auto2 = LuoAuto(Level.Right - 20, 0); 
     37 
     38        Keyboard.Listen(Key.Up, ButtonState.Down, liikutaAutoa, "liikuta", auto); 
     39        Keyboard.Listen(Key.Down, ButtonState.Down, liikutaAutoa, "liikuta", auto); 
     40        Keyboard.Listen(Key.Left, ButtonState.Down, Kaanny, "Kääntyy", Angle.FromDegrees(4), auto); 
     41        Keyboard.Listen(Key.Right, ButtonState.Down, Kaanny, "Kääntyy", Angle.FromDegrees(-4), auto); 
     42 
     43        Keyboard.Listen(Key.W, ButtonState.Down, liikutaAutoa, "liikuta", auto2); 
     44        Keyboard.Listen(Key.S, ButtonState.Down, liikutaAutoa, "liikuta", auto2); 
     45        Keyboard.Listen(Key.A, ButtonState.Down, Kaanny, "Kääntyy", Angle.FromDegrees(4), auto2); 
     46        Keyboard.Listen(Key.D, ButtonState.Down, Kaanny, "Kääntyy", Angle.FromDegrees(-4), auto2); 
    1747    } 
     48 
     49    Automobile LuoAuto(double x, double y) 
     50    { 
     51 
     52 
     53        Automobile auto = new Automobile(27.5, 45); 
     54        auto.Shape = Shape.Rectangle; 
     55        auto.X = x; 
     56        auto.Y = y; 
     57        auto.Restitution = 0.5; 
     58        Add(auto); 
     59        return auto; 
     60 
     61 
     62 
     63 
     64 
     65    } 
     66 
     67    void Kaanny (Angle kulma, Automobile auto) 
     68    { 
     69        auto.Turn(kulma,1); 
     70    } 
     71 
     72    void liikutaAutoa(Automobile auto) 
     73    { 
     74        auto.Accelerate(1); 
     75        auto.LinearDamping = 0.99; 
     76        auto.AngularDamping = 0.99; 
     77    } 
     78 
     79    void autonSuunta(PhysicsObject auto) 
     80    { 
     81        Vector autonsuunta = Vector.FromLengthAndAngle(1.0, auto.Angle); 
     82    } 
     83 
     84    void asetaNopeus(PhysicsObject auto, Vector nopeus) 
     85    { 
     86        auto.Velocity = nopeus; 
     87    } 
     88 
     89 
    1890} 
  • 2012/30/TuomasW/Mortal Rally/Mortal Rally/Mortal Rally/Properties/AssemblyInfo.cs

    r3723 r3745  
    2323// project is exposed to COM. On other platforms, it unique identifies the 
    2424// title storage container when deploying this assembly to the device. 
    25 [assembly: Guid("a46ff5a7-3368-4e43-b75a-9d2d880d44c0")] 
     25[assembly: Guid("8714d2e0-623e-4f29-8f07-0f1f40480a8c")] 
    2626 
    2727// Version information for an assembly consists of the following four values: 
  • 2012/30/TuomasW/Mortal Rally/Mortal Rally/Mortal RallyContent/Mortal RallyContent.contentproj

    r3723 r3745  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    33  <PropertyGroup> 
    4     <ProjectGuid>{0C926CB7-16EA-47E0-8B3B-CB5F034F2CF1}</ProjectGuid> 
     4    <ProjectGuid>{53AC2457-D3C9-4FFA-95CC-C8936BFC2918}</ProjectGuid> 
    55    <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 
    66    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
     
    4444    <Reference Include="TextFileContentExtension" /> 
    4545  </ItemGroup> 
     46  <ItemGroup> 
     47    <Compile Include="rata02.jpg"> 
     48      <Name>rata02</Name> 
     49      <Importer>TextureImporter</Importer> 
     50      <Processor>TextureProcessor</Processor> 
     51    </Compile> 
     52  </ItemGroup> 
     53  <ItemGroup> 
     54    <Compile Include="rata.png"> 
     55      <Name>rata</Name> 
     56      <Importer>TextureImporter</Importer> 
     57      <Processor>TextureProcessor</Processor> 
     58    </Compile> 
     59  </ItemGroup> 
     60  <ItemGroup> 
     61    <Compile Include="aidat.png"> 
     62      <Name>aidat</Name> 
     63      <Importer>TextureImporter</Importer> 
     64      <Processor>TextureProcessor</Processor> 
     65    </Compile> 
     66  </ItemGroup> 
    4667  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4768  <!--  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.