Beispiel #1
0
        public EventSet(Stream input)
        {
            var reader    = new BinaryReader(input);
            int numActive = reader.ReadInt16();
            int numBlocks = reader.ReadInt16();

            for (int i = 0; i < numActive; i++)
            {
                ActiveBlocks.Add(reader.ReadInt16());
            }
            for (int i = 0; i < numBlocks; i++)
            {
                Blocks.Add(new Block(reader));
            }
        }
Beispiel #2
0
 /// <summary>
 /// Adds the block effect.  Used to make tile appear to move on board
 /// </summary>
 /// <param name="startPos">Blocks initial position</param>
 /// <param name="targetPos">Blocks destination</param>
 /// <param name="lastElement">The id of the final boardcell to be occupied</param>
 public void AddBlock(Vector2 startPos, Vector2 targetPos, int lastElement, int chosenBlock)
 {
     ActiveBlocks.Add(new BlockMoving(startPos, targetPos, lastElement, chosenBlock));
 }