C# 클래스 Platformer.Tiles.MoveableTile

A tile that moves in a given direction. Once the tile collides with a solid object, it reverses its direction. Code inspired from: http://robotfootgames.com/2011/05/movable-platforms/
상속: Tile
파일 보기 프로젝트 열기: zmthy/play-dead 1 사용 예제들

공개 메소드들

메소드 설명
MoveableTile ( Microsoft.Xna.Framework.Graphics.Sprite sprite, TileCollision collision, Vector2 velocity ) : System

Creates a new Moveable tile.

bindToLevel ( Level level ) : void

보호된 메소드들

메소드 설명
getCollidingTile ( ) : Tile

비공개 메소드들

메소드 설명
getAdjacentCellAtAngle ( Vector2 currentCell, float angleRadians ) : Vector2

메소드 상세

MoveableTile() 공개 메소드

Creates a new Moveable tile.
public MoveableTile ( Microsoft.Xna.Framework.Graphics.Sprite sprite, TileCollision collision, Vector2 velocity ) : System
sprite Microsoft.Xna.Framework.Graphics.Sprite Sprite representing texture, size, and position of the tile.
collision TileCollision Type of collision for the tile.
velocity Vector2 Tile velocity: .X is the movement angle in radians and .Y is the speed in pixels per second.
리턴 System

bindToLevel() 공개 메소드

public bindToLevel ( Level level ) : void
level Platformer.Levels.Level
리턴 void

getCollidingTile() 보호된 메소드

protected getCollidingTile ( ) : Tile
리턴 Tile