コード例 #1
0
    void Start()
    {
        circuitGrid = GameObject.Find("CircuitGrid");
        circuitGridControlScript = circuitGrid.GetComponent <CircuitGridControl>();

        qubitNumber            = circuitGridControlScript.qubitNumber;
        circuitDepth           = circuitGridControlScript.circuitDepth;
        stateNumber            = (int)Math.Pow(2, qubitNumber);
        circuitDimensionString = string.Join(",", qubitNumber, circuitDepth);
        paddleArray            = circuitGridControlScript.paddleArray;
        GetStateVector(gateString);
    }
コード例 #2
0
ファイル: GameManager.cs プロジェクト: qiushurong/QPong-Unity
    // Start is called before the first frame update
    void Start()
    {
        theBall           = GameObject.FindGameObjectWithTag("Ball");
        ballControlScript = theBall.GetComponent <BallControl>();

        theCircuitGrid           = GameObject.FindGameObjectWithTag("CircuitGrid");
        circuitGridControlScript = theCircuitGrid.GetComponent <CircuitGridControl>();

        theClassicalPaddle           = GameObject.FindGameObjectWithTag("ClassicalPaddle");
        classicalPaddleControlScript = theClassicalPaddle.GetComponent <ComputerControls>();

        arcadeButtonInput = gameObject.GetComponent <ArcadeButtonInput>();
        player            = GameController.Instance.player;

        RestartGame();
    }