// Use this for initialization void Start() { txt = GetComponent <Text>(); txt.text = ""; cherryCountScript = GameObject.Find("CherryCount").GetComponent <CherryCountScript>(); timeScript = GameObject.Find("TimeCount").GetComponent <TimeScript>(); playerSoulScript = GameObject.Find("PlayerSoul").GetComponent <PlayerSoulScript>(); }
// Use this for initialization void Start() { A = 0.0f; // 加速度 posY = 0.0f; // Y座標 JUMPPOWER = 0.98f * 6.0f / 8.0f; // 加速度 G = 0.98f / 12.0f; // 重力 B = 0.0f; i = 0; collider2D = GetComponent <Collider2D>(); animator = GetComponent <Animator>(); cherryCountScript = GameObject.Find("CherryCount").GetComponent <CherryCountScript>(); timeScript = GameObject.Find("TimeCount").GetComponent <TimeScript>(); mainCamera = GameObject.FindWithTag("MainCamera"); resultScript = GameObject.Find("Text").GetComponent <ResultScript>(); animator.SetBool("idle", true); animator.SetBool("run", false); this.rigidbody2D = GetComponent <Rigidbody2D>(); A = JUMPPOWER; }
// Use this for initialization void Start() { cherryCountScript = GameObject.Find("CherryCount").GetComponent <CherryCountScript>(); }