public UsedBlockEntity(ObstacleFactory factory, Vector2 position, Entity ItemEnt) : base(factory, ItemEnt) { Block = (AbstractObstacle)SpriteFactory.getSprite((int)obstacleTypes.USEDBLOCK); Block.Position = position; CurrentBlockState = new UsedBlockState(BlockSM, this); }
public LevelFlagEntity(Scene scene, ObstacleFactory factory, Vector2 position) : base(scene, factory, position) { Flag = (AbstractObstacle)Factory.getFlag((int)flagTypes.FLAG); Flag.Position = position; Sprite.Position = position; }
public QuestionBlockEntity(ObstacleFactory factory, Vector2 position, Entity ItemEnt) : base(factory, ItemEnt) { Block = (AbstractObstacle)SpriteFactory.getSprite((int)obstacleTypes.QUESTIONBLOCK); Block.Position = position; BlockSM = new BlockStateMachine(this); CurrentBlockState = new QuestionBlockState(BlockSM, this); }
public LevelCheckpointEntity(Scene scene, ObstacleFactory factory, Vector2 position, int ID) : base(scene, factory, position) { Flag = (AbstractObstacle)Factory.getFlag((int)flagTypes.CHECKPOINT); Flag.Position = position; Sprite.Position = position; this.ID = ID; }
public PyramidEntity(ObstacleFactory factory, Vector2 position, Entity ItemEnt) : base(factory, ItemEnt) { Block = (AbstractObstacle)SpriteFactory.getSprite((int)obstacleTypes.PYRAMID); Block.Position = position; BlockSM = new BlockStateMachine(this); CurrentBlockState = new PyramidBlockState(BlockSM, this); }
public FloorBlockEntity(ObstacleFactory factory, Vector2 position, Entity ItemEnt, int floorType) : base(factory, ItemEnt) { Block = (AbstractObstacle)SpriteFactory.getFloor(floorType); Block.Position = position; BlockSM = new BlockStateMachine(this); CurrentBlockState = new FloorBlockState(BlockSM, this); }
protected BlockForm(ObstacleFactory factory, Entity ItemEnt) : base() { item = (ItemEntity)ItemEnt; if (item != null) { item.ChangeItemState(item.ItemSM.Inactive); } SpriteFactory = factory; }
public FlagEntity(Scene scene, ObstacleFactory factory, Vector2 position) : base() { this.scene = scene; Factory = factory; isHit = false; HUD.PointTracker.Subscribe(this); HUD.MarioLifeTracker.Subscribe(this); }
public BrickEntity(ObstacleFactory factory, Vector2 position, Entity ItemEnt) : base(factory, ItemEnt) { Block = (AbstractObstacle)SpriteFactory.getSprite((int)obstacleTypes.BRICKBLOCK); Block.Position = position; Block.Position = Vector2.Clamp(this.Position, new Vector2(0f, Position.Y - 2f), new Vector2(1000000f, Position.Y)); B = new AbstractObstacle[4]; for (int i = 0; i < 4; i++) { B[i] = (AbstractObstacle)SpriteFactory.getSprite((int)obstacleTypes.BRICKSHARD); B[i].Position = Block.Position; B[i].Velocity = Vector2.Zero; } Sprite.Position = position; Block.Velocity = Vector2.Zero; float originalPos = Block.Position.Y; BlockSM = new BlockStateMachine(this); CurrentBlockState = new BrickBlockState(BlockSM, this); }
public MovingBlockEntity(ObstacleFactory factory, Vector2 position, Entity ItemEnt, float speed, bool hMovement, float start, float finish) : base(factory, ItemEnt) { Start = start; Finish = finish; Speed = speed; isHMovement = hMovement; Block = (AbstractObstacle)SpriteFactory.getSprite((int)obstacleTypes.USEDBLOCK); Block.Position = position; Sprite.Position = position; Block.Velocity = Vector2.Zero; BlockSM = new BlockStateMachine(this); if (hMovement) { CurrentBlockState = new HMovingBlockState(BlockSM, this); } else { CurrentBlockState = new VMovingBlockState(BlockSM, this); } }