Exemplo n.º 1
0
 public void ChangeState(BlockStateBase newState)
 {
     BlockState = newState;
     BlockState.SetParentBlock(this);
     if (Sprite == null)
         Sprite = new BlockSprite(this, BlockState.GetFrames());
 }
Exemplo n.º 2
0
        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;

        }