本文整理汇总了C#中TileCollision类的典型用法代码示例。如果您正苦于以下问题:C# TileCollision类的具体用法?C# TileCollision怎么用?C# TileCollision使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TileCollision类属于命名空间,在下文中一共展示了TileCollision类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MovableTile
public MovableTile(Level level, Vector2 position, TileCollision collision)
{
this.level = level;
this.position = position;
this.collision = collision;
LoadContent();
}
开发者ID:Japskua,项目名称:EvolutionaryWeapon,代码行数:7,代码来源:MovableTile.cs
示例2: TileTODO
//public static readonly Vector2 Size = new Vector2(Width, Height);
/// <summary>
/// Constructs a new tile.
/// </summary>
public TileTODO(Texture2D texture, TileCollision collision)
{
Width = texture.Width;
Height = texture.Height;
Texture = texture;
Collision = collision;
}
开发者ID:CharlesMicou,项目名称:Projects,代码行数:11,代码来源:Tile.cs
示例3: MoveableTile
/// <summary>
/// Creates a new Moveable tile.
/// </summary>
/// <param name="sprite">Sprite representing texture, size, and position of the tile. </param>
/// <param name="collision">Type of collision for the tile.</param>
/// <param name="velocity">Tile velocity: .X is the movement angle in radians and .Y is the speed in pixels per second.</param>
public MoveableTile(Sprite sprite, TileCollision collision, Vector2 velocity)
: base(sprite, collision)
{
this.velocity = velocity;
Leader = this; // By default, tiles lead themselves
}
开发者ID:zmthy,项目名称:play-dead,代码行数:13,代码来源:MoveableTile.cs
示例4: Tile
public Tile(string tileName, Texture texture, TileCollision tileCollision, Vector position)
{
TileName = tileName;
TileCollision = tileCollision;
Sprite.Texture = texture;
Sprite.SetPosition(position);
}
开发者ID:Drahkir,项目名称:AnotherCastle,代码行数:7,代码来源:Tile.cs
示例5: Tile
/// <summary>
/// Constructs a new tile.
/// </summary>
public Tile(Sprite sprite, TileCollision collision)
{
if (sprite != null)
Sprite = sprite;
else
Sprite = new Sprite();
Collision = collision;
}
开发者ID:zmthy,项目名称:play-dead,代码行数:11,代码来源:Tile.cs
示例6: MovableTile
public MovableTile(Level level, Vector2 position, TileCollision collision , Boolean SmashBlock)
{
this.level = level;
this.position = position;
this.collision = collision;
this.isSmashBlock = SmashBlock;
LoadContent();
}
开发者ID:nickzren,项目名称:Ninjitsu,代码行数:8,代码来源:MovableTile.cs
示例7: Tile
public Tile(Texture2D texture, TileCollision collision, Rectangle bounds, Vector2 position)
{
this.texture = texture;
this.tileType = collision;
this.bounds = bounds;
this.position = position;
this.pathfindingParm = new AstarParam();
}
开发者ID:Andrusza,项目名称:Pacman,代码行数:8,代码来源:Tile.cs
示例8: LadderTile
/// <summary>
/// Constructor defaulting to inactive ladder
/// </summary>
/// <param name="sprite"></param>
/// <param name="collision"></param>
public LadderTile(Sprite sprite, TileCollision collision)
: base(sprite, collision)
{
activated = sprite.Texture;
deactivated = null;
isActive = false;
this.Sprite = sprite;
}
开发者ID:zmthy,项目名称:play-dead,代码行数:14,代码来源:LadderTile.cs
示例9: Tile
public Tile(PyramidPanic game,string tileName
,Vector2 position,TileCollision tileCollision,char charItem)
{
this.game = game;
this.tileCollision = tileCollision;
this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\tiles\"+tileName);
this.position = position;
this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, texture.Width, texture.Height);
this.charItem = charItem;
}
开发者ID:Bob-Thomas,项目名称:Pyramid-Panic,代码行数:10,代码来源:Tile.cs
示例10: MovingBlock
//Constructor
public MovingBlock(PyramidPanic game, string blockName, Vector2 location,
TileCollision blockCollision, char charItem )
{
this.game = game;
this.texture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\pushable\" + blockName);
//this.colText = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\CollisionText");
this.startLocation = location;
this.Location = location;
this.state = new MovingBlockIdle(this);
}
开发者ID:Bob-Thomas,项目名称:Pyramid-Panic,代码行数:11,代码来源:MovingBlock.cs
示例11: Platform
public Platform(Rectangle platformBounds,TileCollision collision, Boolean isShadowCaster, KryptonEngine krypton)
{
this.krypton = krypton;
Collision = collision;
IsShadowCaster = isShadowCaster;
Bounds = platformBounds;
if (isShadowCaster)
{
ShadowHull shadowHull = ShadowHull.CreateRectangle(new Vector2(platformBounds.Width, platformBounds.Height));
shadowHull.Position.X = platformBounds.X + platformBounds.Width/2;
shadowHull.Position.Y = platformBounds.Y + platformBounds.Height/2;
krypton.Hulls.Add(shadowHull);
}
}
开发者ID:callumlawson,项目名称:Projects,代码行数:14,代码来源:Platform.cs
示例12: Tile
/// <summary>
/// Constructs a new tile.
/// </summary>
public Tile(int texture)
{
Texture = texture;
if (texture < 6)
{
Collision = TileCollision.Passable;
}
else if (texture < 99)
{
Collision = TileCollision.Platform;
}
else
{
Collision = TileCollision.LevelExit;
}
}
开发者ID:surfziggy,项目名称:flaming-octopus,代码行数:19,代码来源:Tile.cs
示例13: Tile
public Tile(TileType typeIn, int xIn, int yIn, int totalWidthIn, int totalHeightIn, Random rand, TileCollision collision, int decoration = -1)
{
tileType = typeIn;
size.X = size.Y = 16;
position = new Vector2(xIn * size.X, yIn * size.Y);
render = true;
decorationValue = decoration;
tileOrientation = TileOrientation.Regular;
totalHeight = totalHeightIn;
totalWidth = totalWidthIn;
tileCollision = collision;
if (tileType == TileType.Dirt)
{
hitsRequired = 1;
if (rand.Next(1, 25) == 5)
{
//damage = rand.Next(1, 3);
// health = damage * 30;
}
}
else if (tileType == TileType.Metal)
hitsRequired = 5;
}
开发者ID:JohnAkerman,项目名称:Graven,代码行数:24,代码来源:Tile.cs
示例14: LoadTile
/// <summary>
/// Creates a new tile. The other tile loading methods typically chain to this
/// method after performing their special logic.
/// </summary>
/// <param name="name">
/// Path to a tile texture relative to the Content/Tiles directory.
/// </param>
/// <param name="collision">
/// The tile collision type for the new tile.
/// </param>
/// <returns>The new tile.</returns>
private Tile LoadTile(string name, TileCollision collision)
{
return new Tile(Content.Load<Texture2D>("Tiles/" + name), collision);
}
开发者ID:kazha,项目名称:Pearl,代码行数:15,代码来源:Level.cs
示例15: LoadEnviornmentTile
private Tile LoadEnviornmentTile(string tileNameInput, int variationCount, TileCollision collisionInput)
{
int index = random.Next(variationCount);
return LoadTile(tileNameInput + index, collisionInput);
}
开发者ID:RamenNoodles452,项目名称:Project-FenixDown,代码行数:5,代码来源:LevelBuilder.cs
示例16: LevelTile
/// <summary>
/// Constructs a new tile.
/// </summary>
public LevelTile(Texture2D texture, TileCollision collision)
{
Texture = texture;
Collision = collision;
}
开发者ID:nickzren,项目名称:Ninjitsu,代码行数:8,代码来源:LevelTile.cs
示例17: Tile
/// <summary>
/// For a teleport collision type
/// </summary>
/// <param name="collision">The collision type</param>
/// <param name="name">The name of this tile sprite</param>
/// <param name="texture">The texture used</param>
/// <param name="destination">The destination tile where the player will be teleported on collision</param>
public Tile(TileCollision collision, String name, Texture2D texture, Tile destination)
: base(name, texture)
{
_destination = destination.Position;
Collision = collision;
}
开发者ID:Prismik,项目名称:TDPlatformer,代码行数:13,代码来源:Tile.cs
示例18: LoadTile
/// <summary>
/// This function creates an individual tile.
/// </summary>
/// <param name="texture">texture of tile</param>
/// <param name="collision">collision type of tile</param>
/// <returns>tile object</returns>
private Tile LoadTile(Texture2D texture, TileCollision collision)
{
return new Tile(texture, collision);
}
开发者ID:egmcdonald,项目名称:radio,代码行数:10,代码来源:Level.cs
示例19: DestructableTile
public DestructableTile(int life, string name, Vector2 position, TileCollision collision, Engine engine)
: base(name, position, collision, engine)
{
_life = life;
}
开发者ID:vitaly-kobzev,项目名称:WindowsGSM1,代码行数:5,代码来源:Tile.cs
示例20: GroundTile
public GroundTile(string name, Vector2 position, TileCollision collision, Engine engine)
: base(name, position, collision, engine)
{
}
开发者ID:vitaly-kobzev,项目名称:WindowsGSM1,代码行数:4,代码来源:Tile.cs
注:本文中的TileCollision类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论