Changeset 3866


Ignore:
Timestamp:
2012-10-20 15:57:38 (11 years ago)
Author:
sieerinn
Message:
 
Location:
2012/26/AleksanteriV
Files:
155 added
6 edited

Legend:

Unmodified
Added
Removed
  • 2012/26/AleksanteriV/Polla ja Rosvo/Poliisi ja Rosvo/Poliisi ja Rosvo/Poliisi ja Rosvo/Poliisi ja Rosvo.csproj

    r3291 r3866  
    6161  </PropertyGroup> 
    6262  <ItemGroup> 
    63     <Reference Include="Jypeli, Version=5.0.0.0, Culture=neutral, processorArchitecture=x86"> 
    64       <SpecificVersion>False</SpecificVersion> 
    65       <HintPath>..\..\..\..\..\lib\Jypeli.dll</HintPath> 
     63    <Reference Include="Jypeli"> 
     64      <HintPath>..\..\..\..\..\..\Program Files (x86)\Jypeli\lib\x86\Jypeli.dll</HintPath> 
    6665    </Reference> 
    6766    <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86"> 
  • 2012/26/AleksanteriV/Revenge/Revenge/Revenge/Revenge.cs

    r3830 r3866  
    1010{ 
    1111    PhysicsObject pelaaja; 
     12 
    1213    Image taustaKuva = LoadImage("kentat/tausta"); 
    1314 
    1415    public override void Begin() 
    1516    { 
     17         
     18         
    1619        ClearAll(); 
    1720 
    1821        MediaPlayer.Play("musat/halloween"); 
    1922 
     23         
     24         
    2025        luokenttä("kentat/kentta1"); 
    2126 
     27        lisaaohjaimet(); 
    2228 
    23         Level.Background.Image = taustaKuva; 
    24         Level.Background.ScaleToLevelFull(); 
     29        //Level.Background.Image = taustaKuva; 
     30        //Level.Background.ScaleToLevelFull(); 
    2531        Level.BackgroundColor = Color.DarkRed; 
    2632 
    2733        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta peli"); 
    28         Keyboard.Listen(Key.Space, ButtonState.Pressed, Begin, "aloita alusta"); 
     34       // Keyboard.Listen(Key.Space, ButtonState.Pressed, Begin, "aloita alusta"); 
    2935         
    3036         
     
    4248        kentta.SetTileMethod(new Color(255, 0, 0), Luopelaaja); 
    4349 
    44         Gravity = new Vector(0, -100); 
     50        Gravity = new Vector(0, -200); 
    4551 
    4652        kentta.Execute(40, 40); 
     
    5056    void LuoBlock3(Vector paikka, double leveys, double korkeus) 
    5157    { 
    52         PhysicsObject block = new PhysicsObject(leveys, korkeus); 
     58        PhysicsObject block = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    5359        block.Image = LoadImage("blocks/block 2.0"); 
    5460        block.Position = paikka; 
     61 
    5562        Add(block); 
    5663    } 
     
    5865    void LuoBlock2(Vector paikka, double leveys, double korkeus) 
    5966    { 
    60         PhysicsObject block2 = new PhysicsObject(leveys, korkeus); 
     67        PhysicsObject block2 = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    6168        block2.Image = LoadImage("blocks/block 1.0"); 
    6269        block2.Position = paikka; 
     
    6774    { 
    6875        pelaaja = new PhysicsObject(80, 60); 
    69         pelaaja.Shape = Shape.Circle; 
     76        pelaaja.Shape = Shape.FromImage(LoadImage("Erik/tormaysmuoto")); 
    7077        pelaaja.Position = paikka;         
    71         pelaaja.Image = LoadImage("Erik/Erik 1.1"); 
     78        pelaaja.Image = LoadImage("Erik/Erik 2.9"); 
    7279        Camera.Follow(pelaaja); 
     80        pelaaja.CanRotate = false; 
    7381        Camera.Zoom(2.0); 
    7482        Add(pelaaja); 
     83 
     84        PhysicsObject hyppypalikka = new PhysicsObject(20, 20); 
     85        hyppypalikka.IgnoresCollisionResponse = false; 
     86        hyppypalikka.Position = pelaaja.Position - new Vector(0,20); 
     87 
     88        hyppypalikka.CanRotate = false; 
     89        PhysicsStructure liitos = new PhysicsStructure(pelaaja ,hyppypalikka); 
     90        Add(liitos);  
     91 
    7592    } 
     93 
    7694 
    7795    void lisaaohjaimet() 
     
    7997      Keyboard.Listen(Key.Left, ButtonState.Down, LiikutaPelaajaa, null, new Vector(-200, 0), pelaaja); 
    8098      Keyboard.Listen(Key.Right, ButtonState.Down, LiikutaPelaajaa, null, new Vector(200, 0), pelaaja); 
    81       Keyboard.Listen(Key.Up, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, 200), pelaaja); 
    82       Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, -200), pelaaja); 
     99      Keyboard.Listen(Key.Up, ButtonState.Pressed, jumpPelaajaa, null); 
     100      Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, -100), pelaaja); 
    83101    } 
    84102 
    85103    void LiikutaPelaajaa(Vector vektori, PhysicsObject pelaaja) 
    86104    { 
    87         pelaaja.Push(vektori); 
     105          pelaaja.Push(vektori); 
     106    } 
     107    void jumpPelaajaa() 
     108    { 
     109        pelaaja.Hit(new Vector(0, 200)); 
    88110    } 
    89111} 
  • 2012/26/AleksanteriV/Revenge/Revenge/Revenge/Revenge.csproj.Debug.cachefile

    r3830 r3866  
    2323Content\musat\halloween.xnb 
    2424Content\musat\medal_of_honor_theme_song-7D8DzZtalyA_fmt34.xnb 
     25Content\vihut\Death.xnb 
     26Content\vihut\Death1.1.xnb 
     27Content\vihut\Death1.2.xnb 
     28Content\vihut\tu-tuli.xnb 
     29Content\Erik\Erik 2.9.xnb 
     30Content\Erik\tormaysmuoto.xnb 
    2531Content\musat\halloween.wma 
    2632Content\musat\medal_of_honor_theme_song-7D8DzZtalyA_fmt34.wma 
  • 2012/26/AleksanteriV/Revenge/Revenge/RevengeContent/RevengeContent.contentproj

    r3830 r3866  
    170170    </Compile> 
    171171  </ItemGroup> 
     172  <ItemGroup> 
     173    <Compile Include="vihut\Death.png"> 
     174      <Name>Death</Name> 
     175      <Importer>TextureImporter</Importer> 
     176      <Processor>TextureProcessor</Processor> 
     177    </Compile> 
     178  </ItemGroup> 
     179  <ItemGroup> 
     180    <Compile Include="vihut\Death1.1.png"> 
     181      <Name>Death1.1</Name> 
     182      <Importer>TextureImporter</Importer> 
     183      <Processor>TextureProcessor</Processor> 
     184    </Compile> 
     185  </ItemGroup> 
     186  <ItemGroup> 
     187    <Compile Include="vihut\Death1.2.png"> 
     188      <Name>Death1.2</Name> 
     189      <Importer>TextureImporter</Importer> 
     190      <Processor>TextureProcessor</Processor> 
     191    </Compile> 
     192  </ItemGroup> 
     193  <ItemGroup> 
     194    <Compile Include="vihut\tu-tuli.png"> 
     195      <Name>tu-tuli</Name> 
     196      <Importer>TextureImporter</Importer> 
     197      <Processor>TextureProcessor</Processor> 
     198    </Compile> 
     199  </ItemGroup> 
     200  <ItemGroup> 
     201    <Compile Include="Erik\Erik 2.9.png"> 
     202      <Name>Erik 2.9</Name> 
     203      <Importer>TextureImporter</Importer> 
     204      <Processor>TextureProcessor</Processor> 
     205    </Compile> 
     206  </ItemGroup> 
     207  <ItemGroup> 
     208    <Compile Include="Erik\tormaysmuoto.png"> 
     209      <Name>tormaysmuoto</Name> 
     210      <Importer>TextureImporter</Importer> 
     211      <Processor>TextureProcessor</Processor> 
     212    </Compile> 
     213  </ItemGroup> 
    172214  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    173215  <!--  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.