Changeset 7646 for 2016


Ignore:
Timestamp:
2016-07-02 23:37:37 (3 years ago)
Author:
sieerinn
Message:

Turhat kommentit poistettu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/SimoR/SimplePhysicsTest/SimplePhysicsTest/SimplePhysicsTest/SimplePhysicsTest.cs

    r7644 r7646  
    3939    private bool walkRight; 
    4040 
    41     //private double movement; 
    42  
    4341    public Enemy(double width, double height) : base(width, height) 
    4442    { 
     
    4745    public override void Update(Time time) 
    4846    { 
    49         //if (movement == 0) 
    50         //    movement = -Speed; 
    51  
    5247        if (Game.Collisions(this, new Vector(2, 1), true).Count > 0) 
    5348            walkRight = false; 
    54             //movement = -Speed; 
    5549 
    5650        if (Game.Collisions(this, new Vector(-2, 1), true).Count > 0) 
    5751            walkRight = true; 
    58             //movement = Speed; 
    5952 
    6053        if (!FallOffPlatforms) 
     
    6659            { 
    6760                walkRight = false; 
    68                 //movement = -Speed; 
    6961            } 
    7062            if (Game.GetTileAt(Game.WorldToTilePosition(bottomLeft)) == null) 
    7163            { 
    7264                walkRight = true; 
    73                 //movement = Speed; 
    74             } 
    75         } 
    76  
    77         //Velocity = new Vector(movement, Velocity.Y); 
     65            } 
     66        } 
     67 
    7868        Walk(walkRight? Speed : -Speed); 
    7969        base.Update(time); 
Note: See TracChangeset for help on using the changeset viewer.