Exemple #1
0
    public VVV_Block(Block parent, BlockType type, int blockNum, int bickNum, Vector3 locStartPot, Vector3 locEndPot, int moveDelay, float moveDuration, Vector3[] moveSpan)
        : base(parent, type, locStartPot, locEndPot, moveDelay, moveDuration)
    {
        Vector3 tmpStartPot = Vector3.zero;
        Vector3 tmpEndPot   = Vector3.zero;

        for (int i = 0; i < blockNum; i++)
        {
            tmpStartPot.Set(i * Brick.WIDTH, 0, 0);
            tmpEndPot = tmpStartPot + moveSpan [i];
            Block block = new V_Block(this, BlockType.V, bickNum, tmpStartPot, tmpEndPot, i, GetDiriction(tmpStartPot, tmpEndPot), null);
            m_Blocks.Add(block);
        }
    }
Exemple #2
0
    public void AddBlock_V(Vector3 loc_StartPot, Vector3 moveSpan, int moveDelay = 0)
    {
        GameObject go      = new GameObject("Block_V");
        V_Block    v_Block = go.AddComponent <V_Block> ();

        go.transform.parent = this.transform;
        v_Block.M_Parent    = this;

        v_Block.M_Loc_StartPot = loc_StartPot;
        v_Block.M_MoveSpan     = moveSpan;
        v_Block.M_Loc_CurPot   = v_Block.M_Loc_StartPot;
        v_Block.M_MoveDelay    = moveDelay;

        v_Block.AdjustBrickNum(4);
        m_Blocks.Add(v_Block);
    }