Ejemplo n.º 1
0
 ///<summary>
 ///Adds two WorldUnits for a new WorldUnit
 ///</summary>
 public WorldUnit Add(WorldUnit j)
 {
     return(new WorldUnit(ref ScreenSize, Position + j.Position));
 }
Ejemplo n.º 2
0
 ///<summary>
 ///Construct a WorldUnit class based off the same scales as another WorldUnit for use as a position.
 ///</summary>
 ///<param name="position">The position of this object on the screen (as a ratio)</param>
 ///<param name="baseScaleUnit">The scale to base this new WorldUnit off of.</param>
 public WorldUnit(Vector2 position, WorldUnit baseScaleUnit)
 {
     Position   = position;
     ScreenSize = baseScaleUnit.ScreenSize;
 }