Ignore:
Timestamp:
2013-07-23 11:06:44 (6 years ago)
Author:
dezhidki
Message:

Talletus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Physics/BoundingRectangle.cs

    r4535 r4550  
    11 
     2using Microsoft.Xna.Framework; 
    23namespace CastleMaster.Physics 
    34{ 
     
    4748        } 
    4849 
     50        public BoundingRectangle AddSelf(float x0, float z0, float x1, float z1) 
     51        { 
     52            this.x0 += x0; 
     53            this.z0 += z0; 
     54            this.x1 += x1; 
     55            this.z1 += z1; 
     56 
     57            return this; 
     58        } 
     59 
     60        public BoundingRectangle AddSelf(BoundingRectangle br) 
     61        { 
     62            this.x0 += br.x0; 
     63            this.z0 += br.z0; 
     64            this.x1 += br.x1; 
     65            this.z1 += br.z1; 
     66 
     67            return this; 
     68        } 
     69 
     70        public static BoundingRectangle operator +(BoundingRectangle br, Vector2 vec) 
     71        { 
     72            return new BoundingRectangle(br.x0 + vec.X, br.z0 + vec.Y, br.x1 + vec.X, br.z1 + vec.Y, br.owner); 
     73        } 
    4974    } 
    5075} 
Note: See TracChangeset for help on using the changeset viewer.