Changeset 2199


Ignore:
Timestamp:
2011-06-28 11:02:06 (12 years ago)
Author:
janiemit
Message:

Talletus.

Location:
2011/26/JaniN
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JaniN/neon wars/neon wars/neon wars/Peli.cs

    r2166 r2199  
    1414{ 
    1515    PhysicsObject Ihansama; 
    16     PhysicsObject pyssy; 
     16    GameObject pyssy; 
    1717 
    1818 
    1919    public override void Begin() 
    2020    { 
    21  
     21        aseta_näppäimet(); 
    2222        Mouse.IsCursorVisible = true; 
    2323         
     
    2727        Add(Ihansama); 
    2828         
    29         pyssy = new PhysicsObject (15, 80); 
     29        pyssy = new GameObject(200, 15); 
    3030        pyssy.Color = Color.Black; 
    31         pyssy.Position = new Vector(Ihansama.Position.X, Ihansama.Position.Y+pyssy.Height/2); 
    32         pyssy.Mass = 0.001; 
    33         Add(pyssy); 
     31        Ihansama.Add(pyssy); 
     32        //pyssy.Position = new Vector(Ihansama.Position.X, Ihansama.Position.Y+pyssy.Height/2); 
     33        //Add(pyssy); 
    3434 
    35         HingeJoint liitos = PhysicsGame.CreateHingeJoint(Ihansama, pyssy, Ihansama.Position); 
    36         Add(liitos); 
    37  
     35        //HingeJoint liitos = PhysicsGame.CreateHingeJoint(Ihansama, pyssy, Ihansama.Position); 
     36        //Add(liitos); 
     37        pyssy.Image = LoadImage("Untitled");  
    3838        // Gravity = new Vector(0, -1000); 
    3939        Level.CreateBorders(); 
    4040    } 
    4141 
     42 
     43    void aseta_näppäimet() 
     44    { 
     45        Mouse.Listen(MouseButton.Left, ButtonState.Down, ampuu, null); 
     46    } 
     47     
     48     
     49     
     50     
    4251    protected override void Update(Time time) 
    4352    { 
     
    4958        base.Update(time); 
    5059    } 
     60 
     61    void ampuu() 
     62    { 
     63        PhysicsObject ammus = new PhysicsObject(5, 5); 
     64         
     65        Add(ammus); 
     66        ammus.Position = Ihansama.Position; 
     67    } 
    5168} 
  • 2011/26/JaniN/neon wars/neon wars/neon warsContent/neon warsContent.contentproj

    r2166 r2199  
    4242    </Reference> 
    4343  </ItemGroup> 
     44  <ItemGroup> 
     45    <Compile Include="Untitled.png"> 
     46      <Name>Untitled</Name> 
     47      <Importer>TextureImporter</Importer> 
     48      <Processor>TextureProcessor</Processor> 
     49    </Compile> 
     50  </ItemGroup> 
    4451  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4552  <!--  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.