Example #1
0
 public UsedBlockEntity(Vector2 loc, EventSoundEffects sounds) : base(loc, sounds)//there are no sounds for used blocks
 {
     Factory = new BlockFactory();
     BState  = new UsedBlockState(this);
     Sprite  = Factory.BuildSprite(Factory.FindType(BState), loc);
     BState.Enter(null);
     SpritePosition  = loc;
     InitialPos      = loc;
     EntityCollision = new BlockCollision(this);
 }
Example #2
0
 public HiddenBlockEntity(Vector2 loc, EventSoundEffects sounds) : base(loc, sounds)
 {
     Sounds  = sounds;
     Factory = new BlockFactory();
     BState  = new HiddenBlockState(this);
     Sprite  = Factory.BuildSprite(Factory.FindType(BState), loc);
     BState.Enter(null);
     SpritePosition  = loc;
     InitialPos      = loc;
     EntityCollision = new BlockCollision(this);
 }
Example #3
0
 public PipeBlockEntity(Vector2 loc, EventSoundEffects eventSound) : base(loc, eventSound)
 {
     Sounds  = eventSound;
     Factory = new BlockFactory();
     BState  = new PipeBlockState(this);
     Sprite  = Factory.BuildSprite(Factory.FindType(BState), loc);
     BState.Enter(null);
     SpritePosition  = loc;
     InitialPos      = loc;
     EntityCollision = new BlockCollision(this);
     Warpable        = false;
     WarpVelocity    = new Vector2(0, -1);//normally an outpipe
 }
Example #4
0
 public BridgeBlockEntity(Vector2 loc, EventSoundEffects eventSound) : base(loc, eventSound)
 {
     Items = new Collection <Entity>
     {
         this//first is this one
     };
     Sounds  = eventSound;
     Factory = new BlockFactory();
     BState  = new BridgeBlockState(this);
     Sprite  = Factory.BuildSprite(Factory.FindType(BState), loc);
     BState.Enter(null);
     SpritePosition  = loc;
     InitialPos      = loc;
     EntityCollision = new BlockCollision(this);
 }