Ejemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        Debug.Log("Entered: " + other.gameObject.name);
        IGate gate = (IGate)other.gameObject.GetComponent(other.gameObject.name);

        if (gate.GetGType().Equals(GateType.Single))
        {
            Complex[,] matrix = gate.GetMatrix();

            Debug.Log("| " + matrix[0, 0] + " " + matrix[1, 0] + "|" + System.Environment.NewLine + "| " + matrix[0, 1] + " " + matrix[1, 1] + "|");

            applyMatrix(matrix);
        }
        else if (gate.GetGType().Equals(GateType.Measurement))
        {
            Measure();
        }
    }