コード例 #1
0
ファイル: Swoosh.cs プロジェクト: RytmeAnders/med4
    void Start()
    {
        ard           = GetComponent <ReadingArduino>();     //Object of the ReadingArduino script
        lowPassFilter = GetComponent <AudioLowPassFilter>(); //Object of the LowPassFilter component

        orientationOld  = ard.orientation;                   //Initial orientation value
        accelerationOld = ard.acceleration;                  //Initial acceleration value
    }
コード例 #2
0
ファイル: ThrowBall.cs プロジェクト: RytmeAnders/med4
 void Start()
 {
     arduino = GetComponent <ReadingArduino>();
     // Getting rigidbody and ball components
     rb         = GetComponent <Rigidbody>();
     ballPos    = GameObject.Find("Ball");
     initialPos = ballPos.GetComponent <Transform>().position;
 }