Пример #1
0
 public MoveObject(float x, float y, float dw, float dh,
         Animation animation, TileMap map): base(x, y, dw, dh, animation, map)
 {
    
     this.timer = new LTimer(0);
     this.isComplete = false;
     this.allDirection = false;
     this.speed = 4;
 }
Пример #2
0
 public JumpObject(float x, float y, Animation animation, TileMap map):  base(x, y, 0, 0, animation, map)
 {
     this.GRAVITY = 0.6f;
     vx = 0;
     vy = 0;
     speed = 6f;
     jumpSpeed = 12f;
     onGround = false;
     forceJump = false;
     jumperTwo = false;
     canJumperTwo = true;
 }
Пример #3
0
		public SpriteBatchObject(float x, float y, float dw, float dh,
				Animation animation, TileMap map) {
			this.SetLocation(x, y);
			this.tiles = map;
			this.animation = animation;
			this.dstWidth = dw;
			this.dstHeight = dh;
            Loon.Core.Graphics.Opengl.LTexture texture = animation.GetSpriteImage();
			if (dw < 1 && dh < 1) {
                this.rectBox = new RectBox(x, y, texture
                        .GetWidth(), texture.GetHeight());
			} else {
				this.rectBox = new RectBox(x, y, dw, dh);
			}
		}
Пример #4
0
        public SpriteBatchObject(float x, float y, float dw, float dh,
				Animation animation, TileMap map)
        {
            this.SetLocation(x, y);
            this.tiles = map;
            this.animation = animation;
            this.dstWidth = dw;
            this.dstHeight = dh;
            if (dw < 1 && dh < 1) {
                this.rectBox = new RectBox(x, y, animation.GetSpriteImage()
                        .GetWidth(), animation.GetSpriteImage().GetHeight());
            } else {
                this.rectBox = new RectBox(x, y, dw, dh);
            }
        }
Пример #5
0
            public JumperTwo(float x, float y, Animation animation, TileMap tiles)
                : base(x, y, 32, 32, animation, tiles)
            {

            }
Пример #6
0
 public MoveObject(float x, float y, Animation animation, TileMap map):this(x, y, 0, 0, animation, map)
 {
     
 }
Пример #7
0
 public virtual void SetOffset(TileMap tile, float sx, float sy)
 {
     offset.Set(sx, sy);
     tile.SetOffset(offset);
 }
Пример #8
0
 public SimpleObject(float x, float y, float w, float h,
         Animation animation, TileMap tiles)
     : base(x, y, w, h, animation, tiles)
 {
 }
Пример #9
0
 public virtual void RemoveTileMap(TileMap t)
 {
     tiles.Remove(t);
 }
Пример #10
0
 public virtual void SetIndexTile(TileMap indexTile)
 {
     this.indexTile = indexTile;
 }
Пример #11
0
 public override void Dispose()
 {
     this.keySize = 0;
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (content != null)
     {
         content.Dispose();
         content = null;
     }
     if (indexTile != null)
     {
         indexTile.Dispose();
         indexTile = null;
     }
     if (objects != null)
     {
         objects.Clear();
         objects = null;
     }
     if (pendingAdd != null)
     {
         pendingAdd.Clear();
         pendingAdd = null;
     }
     if (pendingRemove != null)
     {
         pendingRemove.Clear();
         pendingRemove = null;
     }
     tiles.Clear();
     Close();
 }
Пример #12
0
 public virtual void putTileMap(TileMap t)
 {
     tiles.Add(t);
 }
Пример #13
0
 public JumpI(TileMap indexMap, Animation enemyAnimation)
 {
     this.indexMap = indexMap;
     this.enemyAnimation = enemyAnimation;
 }
Пример #14
0
 public override void Dispose()
 {
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (indexTile != null)
     {
         indexTile.Dispose();
         indexTile = null;
     }
     tiles.Clear();
     Close();
 }
Пример #15
0
 public Enemy(float x, float y, Animation animation, TileMap tiles)
     : base(x, y, 32, 32, animation, tiles)
 {
     vx = -SPEED;
     vy = 0;
 }
Пример #16
0
            public Coin(float x, float y, Animation animation, TileMap tiles)
                : base(x, y, 32, 32, animation, tiles)
            {

            }
Пример #17
0
            public Accelerator(float x, float y, Animation animation, TileMap tiles)
                : base(x, y, 32, 32, animation, tiles)
            {

            }
Пример #18
0
 public void PutTileMap(TileMap t)
 {
     tiles.Add(t);
 }
Пример #19
0
 public override void Dispose()
 {
     if (usePhysics)
     {
         _manager.SetStart(false);
         _manager.SetEnableGravity(false);
         _Bodys.Clear();
     }
     this.keySize = 0;
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (content != null)
     {
         content.Dispose();
         content = null;
     }
     if (indexTile != null)
     {
         indexTile.Dispose();
         indexTile = null;
     }
     if (objects != null)
     {
         objects.Clear();
         objects = null;
     }
     if (pendingAdd != null)
     {
         pendingAdd.Clear();
         pendingAdd = null;
     }
     if (pendingRemove != null)
     {
         pendingRemove.Clear();
         pendingRemove = null;
     }
     tiles.Clear();
     Close();
 }