Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     ObjectManager = GameObject.Find("ObjectManager");
     TextManager   = GameObject.Find("TextManager");
     goal_script   = ObjectManager.GetComponent <GoalManager2>();
     score_script  = TextManager.GetComponent <ScoreManager2>();
     count_script  = TextManager.GetComponent <CountManager2>();
 }
Esempio n. 2
0
    void Start()
    {
        TextManager  = GameObject.Find("TextManager");
        count_script = TextManager.GetComponent <CountManager2>();
        // 初期化
        // コントローラをセットしたオブジェクトに紐付いている
        // Animatorを取得する
        this.animator = GetComponent <Animator>();

        rb = GetComponent <Rigidbody2D>();
        //   Debug.Log(rb.velocity.y);
        v_direction = 4;
        // 衝突時にobjectを回転させない設定
        this.rb.constraints = RigidbodyConstraints2D.FreezeRotation;
        //Playerの初期画像
        animator.SetFloat("x", 0);
        animator.SetFloat("y", -1);
    }