Ignore:
Timestamp:
2012-09-22 16:17:41 (7 years ago)
Author:
anlakane
Message:

Talletus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2012/26/EliasY/test1/test1/test1/test1.cs

    r3827 r3857  
    106106    void Tahtaa(AnalogState hiirenLiike) 
    107107    { 
    108         Vector suunta = (Mouse.PositionOnWorld - pelaaja.AbsolutePosition).Normalize(); 
     108        Vector suunta = (Mouse.PositionOnWorld - pelaaja.AbsolutePosition); 
     109        if (suunta != Vector.Zero) 
     110        { 
    109111        pelaaja.Angle = suunta.Angle; 
     112        } 
    110113    } 
    111114 
     
    153156    void Pimenna() 
    154157    { 
    155         pimeys = new GameObject(new Animation(LoadImage("pimeys2"))); 
     158        pimeys = new GameObject(new Animation(LoadImage("pimeys"))); 
    156159        pimeys.Width = 1350; 
    157160        pimeys.Height = 1350; 
     
    223226    PhysicsObject LuoAmmoBox() 
    224227    { 
    225         PhysicsObject ammobox = PhysicsObject.CreateStaticObject(40.0, 30.0); 
     228        PhysicsObject ammobox = PhysicsObject.CreateStaticObject(40.0, 40.0); 
    226229        ammobox.Image = LoadImage("ammobox"); 
    227230        AddCollisionHandler(pelaaja, ammobox, delegate { ammobox.Destroy(); kivaari.Ammo.AddValue(50); }); 
     
    231234    PhysicsObject LuoMedikit() 
    232235    { 
    233         PhysicsObject medikit = PhysicsObject.CreateStaticObject(40.0, 30.0); 
     236        PhysicsObject medikit = PhysicsObject.CreateStaticObject(40.0, 40.0); 
    234237        medikit.Image = LoadImage("medikit"); 
    235238        AddCollisionHandler(pelaaja, medikit, delegate { medikit.Destroy(); pelaajanterveys.Value = 5; }); 
Note: See TracChangeset for help on using the changeset viewer.