Ejemplo n.º 1
0
        }                                           // This is to make sure tiles are only updated once per frame.


        //-----------------------------------------------------------------------------
        // Constructors
        //-----------------------------------------------------------------------------

        // Use Tile.CreateTile() instead of this constructor.
        protected Tile()
        {
            tileGridArea     = Rectangle2I.Zero;
            isAlive          = false;
            isInitialized    = false;
            location         = Point2I.Zero;
            layer            = 0;
            offset           = Point2I.Zero;
            size             = Point2I.One;
            spriteAsObject   = new SpriteAnimation();
            isSolid          = false;
            isMoving         = false;
            pushDelay        = 20;
            properties       = new Properties(this);
            tileData         = null;
            moveDirection    = Point2I.Zero;
            dropList         = null;
            hasMoved         = false;
            path             = null;
            pathTimer        = 0;
            pathMoveIndex    = 0;
            fallsInHoles     = true;
            soundMove        = GameData.SOUND_BLOCK_PUSH;
            conveyorVelocity = Vector2F.Zero;
            surfaceTile      = null;
            collisionStyle   = CollisionStyle.Rectangular;
            graphics         = new TileGraphicsComponent(this);
        }
Ejemplo n.º 2
0
 //-----------------------------------------------------------------------------
 // Constructors
 //-----------------------------------------------------------------------------
 // Use Tile.CreateTile() instead of this constructor.
 protected Tile()
 {
     tileGridArea	= Rectangle2I.Zero;
     isAlive				= false;
     isInitialized		= false;
     location			= Point2I.Zero;
     layer				= 0;
     offset				= Point2I.Zero;
     size				= Point2I.One;
     spriteAsObject		= new SpriteAnimation();
     isSolid				= false;
     isMoving			= false;
     pushDelay			= 20;
     properties			= new Properties(this);
     tileData			= null;
     moveDirection		= Point2I.Zero;
     dropList			= null;
     hasMoved			= false;
     path				= null;
     pathTimer			= 0;
     pathMoveIndex		= 0;
     fallsInHoles		= true;
     soundMove			= GameData.SOUND_BLOCK_PUSH;
     conveyorVelocity	= Vector2F.Zero;
     surfaceTile			= null;
     collisionStyle		= CollisionStyle.Rectangular;
     graphics			= new TileGraphicsComponent(this);
 }