public Ray(Vector2 origin, Vector2 direction) { Origin = origin; Direction = direction; layer = DrawMgr.Layer.Foreground; Redpoint = new Sprite(5, 5); Redpoint.pivot = new Vector2(2.5f, 2.5f); Redpoint.position = Origin; DrawMgr.Add(this); }
public TextChar(Vector2 pos, char ch, Font font) : base(pos, font.TextureName, DrawMgr.Layer.GUI) { this.font = font; charW = this.font.CharW; charH = this.font.CharH; scale = font.Scale; Sprite = new Sprite(charW * scale, charH * scale); Position = pos; Sprite.pivot = new Vector2(Sprite.Width / 2, Sprite.Height / 2); Sprite.Camera = CameraMgr.GetCamera("GUI"); Character = ch; UpdateMgr.Add(this); DrawMgr.Add(this); }
public virtual void Create() { UpdateMgr.Add(this); DrawMgr.Add(this); }