Ejemplo n.º 1
0
 private void Start()
 {
     floorspeed = TitleSceneScript.GetFloorSpeed();
     ballspeed  = TitleSceneScript.GetBallSpeed();
     Debug.Log("floorspeed" + floorspeed);
     Debug.Log("ballspeed" + ballspeed);
 }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        ballspeed_z = TitleSceneScript.GetFloorSpeed();
        ballspeed_x = TitleSceneScript.GetBallSpeed();
        Debug.Log("floorspeed" + ballspeed_z);
        Debug.Log("ballspeed" + ballspeed_x);

        rigidbody = this.GetComponent <Rigidbody>();
        jumpspeed = new Vector3(0f, 200f, 0f);

        mainCamera = GameObject.Find("Main Camera");
    }
Ejemplo n.º 3
0
    void Start()
    {
        //他のシーンから変数を持ってくる方法
        //titlescene = GameObject.Find("TitleGameObject");


        floorspeed = TitleSceneScript.GetFloorSpeed();
        ballspeed  = TitleSceneScript.GetBallSpeed();
        //下の書き方はエラーになる①
        //floorspeed = titlescene.GetComponent<TitleSceneScript>().GetFloorSpeed();//GetFloorSpeed();
        //ballspeed = titlescene.GetComponent<TitleSceneScript>().ballspeed;//GetBallSpeed();
        //下の書き方はエラーになる②
        //floorspeed = TitleSceneScript.GetFloorSpeed();
        //ballspeed = TitleSceneScript.GetBallSpeed();
    }