public void ChangeState(BlockStateBase newState) { BlockState = newState; BlockState.SetParentBlock(this); if (Sprite == null) Sprite = new BlockSprite(this, BlockState.GetFrames()); }
public Block(BlockStateBase state, Vector2 position) : base(SprintFourGame.GetInstance()) { BlockState = state; BlockState.SetParentBlock(this); if (!(state is HiddenBlockState)) { Sprite = new BlockSprite(this, state.GetFrames()); } Position = position; DrawOrder = Utility.BLOCK_DRAW_ORDER; }
public Boggus(BlockStateBase state, Vector2 pos) : base(state, pos) { Sprite = new BoggusSprite(state.GetFrames()); quote = BoggusBlockCounter == 0 ? BoggusLoader.AlphaQuote : BoggusLoader.QuoteList[BoggusBlockCounter % BoggusLoader.QuoteList.Count]; BoggusBlockCounter++; DrawOrder = Utility.OVERLAY_DRAW_ORDER; }