// Start is called before the first frame update void Start() { ObjectManager = GameObject.Find("ObjectManager"); TextManager = GameObject.Find("TextManager"); goal_script = ObjectManager.GetComponent <GoalManager3>(); score_script = TextManager.GetComponent <ScoreManager3>(); count_script = TextManager.GetComponent <CountManager3>(); }
void Start() { TextManager = GameObject.Find("TextManager"); count_script = TextManager.GetComponent <CountManager3>(); // 初期化 // コントローラをセットしたオブジェクトに紐付いている // 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); }