rhythmbullet/RhythmBullet/Zer01HD/Utilities/UI/Modular/Module.cs

39 lines
830 B
C#
Raw Normal View History

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.UI.Modular
{
public class Module
{
public Vector2 Position = new Vector2();
public float Width, Height;
public ModuleGroup Parent;
public string Name;
public Color Color;
public virtual void Update(GameTime gameTime)
{
}
public virtual void Draw(SpriteBatch batch)
{
}
public void RemoveFromParent()
{
if (Parent == null)
{
throw new InvalidOperationException("Parent is null.");
}
Parent.RemoveModule(this);
}
}
}