コード例 #1
0
 public override void Terminate()
 {
     DrawSystem.RemoveObject(drawObject);
     drawObject = null;
 }
コード例 #2
0
 public DrawComponent(Entity owner, Texture2D texture, Color overlay, Rectangle? sourceRect)
     : base(owner, ComponentType.Draw)
 {
     drawObject = DrawSystem.AddObject(texture, owner.Position, owner.Size, owner.Origin, overlay, sourceRect, owner.Rotation);
 }
コード例 #3
0
 public static void RemoveObject(DrawObject d)
 {
     drawObjects.Remove(d);
 }
コード例 #4
0
 public static DrawObject AddObject(Texture2D texture, Vector2 position, Vector2 origin, Color color, Rectangle? sourceRectangle, float rotation, float scale)
 {
     DrawObject obj = new DrawObject(texture, position, Vector2.Zero, origin, color, sourceRectangle, rotation, scale, true);
     drawObjects.Add(obj);
     return obj;
 }
コード例 #5
0
 public static DrawObject AddObject(Texture2D texture, Vector2 position, Vector2 size, Vector2 origin, Color color, Rectangle? sourceRectangle, float rotation)
 {
     DrawObject obj = new DrawObject(texture, position, size, origin, color, sourceRectangle, rotation, 0, false);
     drawObjects.Add(obj);
     return obj;
 }
コード例 #6
0
 public static void AddObject(DrawObject obj)
 {
     drawObjects.Add(obj);
 }