public UITextObject(string id, ObjectType objectType, Transform2D transform,
     Color color, SpriteEffects spriteEffects, float layerDepth, string text, SpriteFont spriteFont, bool isVisible)
     : base(id, objectType, transform, color, spriteEffects, layerDepth, isVisible)
 {
     this.spriteFont = spriteFont;
     this.text = text;
 }
 public UIMouseObject(string id, ObjectType objectType, Transform2D transform,
 Color color, SpriteEffects spriteEffects, float layerDepth, Texture2D texture, bool isVisible)
     : this(id, objectType, transform, color, spriteEffects, layerDepth, texture, 
         new Rectangle(0, 0, texture.Width, texture.Height),
             new Vector2(texture.Width / 2.0f, texture.Height / 2.0f), isVisible)
 {
 }
 public UITextureObject(string id, ObjectType objectType, Transform2D transform,
     Color color, SpriteEffects spriteEffects, float layerDepth, Texture2D texture, 
     Rectangle sourceRectangle, Vector2 origin, bool isVisible)
     : base(id, objectType, transform, color, spriteEffects, layerDepth, isVisible)
 {
     this.Texture = texture;
     this.SourceRectangle = sourceRectangle;
     this.Origin = origin;
 }
        public UIActor(string id, ObjectType objectType, Transform2D transform, 
            Color color, SpriteEffects spriteEffects, float layerDepth, bool isVisible)
        {
            this.id = id;
            this.objectType = objectType;
            this.transform = transform;

            this.color = color;
            this.spriteEffects = spriteEffects;
            this.layerDepth = layerDepth;

            this.isVisible = isVisible;
        }
 public UIMouseObject(string id, ObjectType objectType, Transform2D transform,
     Color color, SpriteEffects spriteEffects, float layerDepth, Texture2D texture, Rectangle sourceRectangle, Vector2 origin, bool isVisible)
     : base(id, objectType, transform, color, spriteEffects, layerDepth, texture, sourceRectangle, origin, isVisible)
 {
 }
Пример #6
0
 public UITextureObject(string id, ActorType actorType, StatusType statusType, Transform2D transform,
                        Color color, SpriteEffects spriteEffects, float layerDepth, Texture2D texture,
                        Rectangle sourceRectangle, Vector2 origin)
     : base(id, actorType, statusType, transform, color, spriteEffects, layerDepth)
 {
     this.Texture                 = texture;
     this.SourceRectangle         = sourceRectangle;
     this.originalSourceRectangle = SourceRectangle;
     this.Origin = origin;
 }
Пример #7
0
 //draws texture using full source rectangle with origin in centre
 public UITextureObject(string id, ActorType actorType, StatusType statusType, Transform2D transform,
                        Color color, SpriteEffects spriteEffects, float layerDepth, Texture2D texture)
     : this(id, actorType, statusType, transform, color, spriteEffects, layerDepth, texture,
            new Rectangle(0, 0, texture.Width, texture.Height),
            new Vector2(texture.Width / 2.0f, texture.Height / 2.0f))
 {
 }
Пример #8
0
 public override bool Remove()
 {
     //tag for garbage collection
     this.transform = null;
     return(base.Remove());
 }
Пример #9
0
 public Actor2D(string id, ActorType actorType, Transform2D transform, StatusType statusType)
     : base(id, actorType, statusType)
 {
     this.transform = transform;
 }
 public virtual void Remove()
 {
     //tag for garbage collection
     this.transform = null;
 }