コード例 #1
0
    // Use this for initialization
    public override void Spawn()
    {
        blockStructure     = BlockData.OBlockStructures;
        blockStructureSize = 2;

        blockCoordinates = spawnCoordinates.Clone() as Coord[, ];
        rotationState    = 0;

        blockTransform = transform;

        blockTransform.localPosition = spawnPosition;
    }
コード例 #2
0
ファイル: Block.cs プロジェクト: RoryDixon/Tetris
    // Use this for initialization
    public virtual void Spawn()
    {
        switch (blockType)
        {
        case BlockType.J:
            blockStructure = BlockData.JBlockStructures;
            break;

        case BlockType.L:
            blockStructure = BlockData.LBlockStructures;
            break;

        case BlockType.S:
            blockStructure = BlockData.SBlockStructures;
            break;

        case BlockType.T:
            blockStructure = BlockData.TBlockStructures;
            break;

        case BlockType.Z:
            blockStructure = BlockData.ZBlockStructures;
            break;

        default:
            blockStructure = BlockData.ZBlockStructures;
            break;
        }

        blockCoordinates = spawnCoordinates.Clone() as Coord[, ];

        blockStructureSize = 3;
        rotationState      = 0;

        wallKickTests = BlockData.WallKickData;

        blockTransform = transform;

        blockTransform.localPosition = spawnPosition;
    }