Example #1
0
    // Use this for initialization
    void Start()
    {
        ///親(Canvas)の親(PlayingMelody)を見る
        Manager = transform.parent.transform.parent.GetComponent <PlayingMelody>();

        var StartXNumber = Random.Range(0, StartX.Length);

        SetStartPosition(StartXNumber);

        SetTargetPosition(StartXNumber);

        Velocity = 0.3f * (Target - PositionInScreen);
    }
 void Start()
 {
     Manager = transform.parent.transform.parent.GetComponent <PlayingMelody>();
 }