GetY() 공개 메소드

Returns the given Y location
public GetY ( ) : float
리턴 float
예제 #1
0
 /**
  * Renders the given GraphicsObject
  *
  * @param spriteBatch Contains graphics contexts for rendering on the game screen
  * @param obj The GraphicsObject that is to be rendered
  */
 public void Render(SpriteBatch spriteBatch, GraphicsObject obj)
 {
     this.Render(spriteBatch, (int)obj.GetX(), (int)obj.GetY(), (int)obj.GetRadius(), obj.GetColor(), (int)obj.GetAngle(), 0.0f, 0, 0);
 }
 /**
  * Update takes a GraphicsObject as a parameter. If there is an object with the
  * same ID we will update the existing object with the new info otherwise we add
  * the object to our dictionary of object
  *
  * @param obj The object that needs to be updated
  */
 public void Update(GraphicsObject obj)
 {
     GraphicsObject value;
     if (this.dictionary.TryGetValue(obj.GetID(), out value))
     {
         // we have it so we just need to update it
         value.SetX(obj.GetX());
         value.SetY(obj.GetY());
         value.SetAngle(obj.GetAngle());
     }
     else
     {
         // we dont have it so we need to add it
         this.dictionary.Add(obj.GetID(), obj);
     }
 }