当前位置: 首页>>代码示例>>C#>>正文


C# Level.ContentLoad方法代码示例

本文整理汇总了C#中Level.ContentLoad方法的典型用法代码示例。如果您正苦于以下问题:C# Level.ContentLoad方法的具体用法?C# Level.ContentLoad怎么用?C# Level.ContentLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Level的用法示例。


在下文中一共展示了Level.ContentLoad方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FireMarioCrouchingSprite

 public FireMarioCrouchingSprite(int isMovingRight, Level level, Vector2 location)
 {
     this.isMovingRight = isMovingRight;
     this.level = level;
     this.texture = level.ContentLoad("Mario/Fire/FireCrouchingMario");
     this.location = location;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:7,代码来源:FireMarioCrouchingSprite.cs

示例2: GoombaMovingSprite

 // Constructor
 public GoombaMovingSprite(Level level)
 {
     this.level = level;
     this.texture = level.ContentLoad("Enemies/Goomba/goomba_walk");
     totalFrames = rows*columns/2;
     frameDelay = frameDelaySet;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:8,代码来源:GoombaMovingSprite.cs

示例3: SmallMarioIdleSprite

 public SmallMarioIdleSprite(int isMovingRight, Level level, Vector2 location)
 {
     this.isMovingRight = isMovingRight;
     this.level = level;
     this.texture = level.ContentLoad("Mario/Small/SmallIdleMario");
     this.location = location;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:7,代码来源:SmallMarioIdleSprite.cs

示例4: LakituThrow

 public LakituThrow(Level level)
 {
     this.level = level;
     this.texture = level.ContentLoad("Enemies/Lakitu/lakitu_throwing");
     this.spriteBatch = level.spriteBatch;
     totalFrames = rows * columns / 2;
     frameDelay = frameDelaySet;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:8,代码来源:LakituThrow.cs

示例5: KoopaIntoShell

 public KoopaIntoShell(Level level)
 {
     this.level = level;
     this.texture = level.ContentLoad("Enemies/Koopa/Koopa_Into_Shell");
     this.spriteBatch = level.spriteBatch;
     totalFrames = rows * columns/2;
     frameDelay = frameDelaySet;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:8,代码来源:KoopaIntoShell.cs

示例6: SpinyThrown

 public SpinyThrown(Level level)
 {
     this.level = level;
     this.texture = level.ContentLoad("Enemies/Spiny/spiny_thrown");
     this.spriteBatch = level.spriteBatch;
     totalFrames = rows * columns / 2;
     frameDelay = frameDelaySet;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:8,代码来源:SpinyThrown.cs

示例7: GoombaDeathSprite

 // Constructor
 public GoombaDeathSprite(Level level)
 {
     this.level = level;
     this.texture = level.ContentLoad("Enemies/Goomba/goomba_death");
     this.font = level.game.Content.Load<SpriteFont>("actions");
     totalFrames = rows*columns;
     collider.Width = texture.Width / columns;
     collider.Height = texture.Height / rows;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:10,代码来源:GoombaDeathSprite.cs

示例8: FireMarioRunningSprite

 // Constructor
 public FireMarioRunningSprite(int isMovingRight, Level level, int nextFrame, Vector2 location)
 {
     this.isMovingRight = isMovingRight;
     this.level = level;
     this.texture = level.ContentLoad("Mario/Fire/FireRunningMario");
     currentFrame = nextFrame;
     totalFrames = 8;
     this.location = location;
 }
开发者ID:KingKumar,项目名称:mario,代码行数:10,代码来源:FireMarioRunningSprite.cs

示例9: BigMarioJumpingSprite

        // Constructor
        public BigMarioJumpingSprite(int isMovingRight, Level level, int nextFrame, Vector2 location)
        {
            this.isMovingRight = isMovingRight;
            this.level = level;
            this.texture = level.ContentLoad("Mario/Big/BigJumpingMario");
            currentFrame = nextFrame;
            frameDelay = 0;
            totalFrames = 18;

            this.location = location;
        }
开发者ID:KingKumar,项目名称:mario,代码行数:12,代码来源:BigMarioJumpingSprite.cs

示例10: BlockFactory

 public BlockFactory(Level level)
 {
     this.level = level;
     this.IdleQuestionBlock = level.ContentLoad("Blocks/QuestionBlockIdle");
     this.BumpedQuestionBlock = level.ContentLoad("Blocks/QuestionBlockBumped");
     this.IdleBrickBlock = level.ContentLoad("Blocks/BrickBlockIdle");
     this.IdleCastleBrickBlock = level.ContentLoad("Blocks/CastleBrickBlockIdle");
     this.IdleUsedBlock = level.ContentLoad("Blocks/UsedBlockIdle");
     this.GreenPipeTexture = level.ContentLoad("Blocks/GreenPipe");
     this.CastlePipeTexture = level.ContentLoad("Blocks/CastlePipe");
     this.IdleDarkBrickBlock = level.ContentLoad("Blocks/DarkBrickBlockIdle");
     this.BumpedDarkBrickBlock = level.ContentLoad("Blocks/DarkBrickBlockBumped");
     this.FloorBlock = level.ContentLoad("Blocks/FloorBlock");
     this.CastleFloorBlock = level.ContentLoad("Blocks/CastleFloorBlock");
     this.DarkFloorBlock = level.ContentLoad("Blocks/DarkFloorBlock");
     this.IdleBlocklet = level.ContentLoad("Blocks/Blocklet");
     this.IdleCastleBlocklet = level.ContentLoad("Blocks/CastleBlocklet");
     this.PyramidBlock = level.ContentLoad("Blocks/PyramidBlock");
     this.IdleLavaBlock = level.ContentLoad("Blocks/Lava");
     this.FlagpoleTexture = level.ContentLoad("Backgrounds/flagpole");
     this.SecretExit = level.ContentLoad("Blocks/DarkRoomExit");
     this.CastlePortalOne = level.ContentLoad("Blocks/CastlePortalOne");
     this.CastleBridge = level.ContentLoad("Blocks/CastleBridge");
     this.CastleLever = level.ContentLoad("Blocks/CastleLever");
 }
开发者ID:KingKumar,项目名称:mario,代码行数:25,代码来源:BlockFactory.cs


注:本文中的Level.ContentLoad方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。