void Start() { //SwordCounter shooting2 = GameObject.Find("weapon"); weaponScript = shooting2.GetComponent <Shooting2>(); bg_swordcounter = bg_swordcounter.GetComponent <Image>(); bg_swordcounter.color = new Color32(255, 255, 68, 255); //HealthBar player = GameObject.Find("Player"); info = player.GetComponent <PlayerINFOScript>(); healthIndicator = healthIndicator.GetComponent <Text>(); loading = loading.GetComponent <Image>(); //Results finishScript = GameObject.Find("Finish").GetComponent <FinishScript>(); resultCanvas = resultCanvas.GetComponent <Canvas>(); bG_result = bG_result.GetComponent <Image>(); medal_1 = medal_1.GetComponent <Image>(); medal_2 = medal_2.GetComponent <Image>(); medal_3 = medal_3.GetComponent <Image>(); time_1 = time_1.GetComponent <Image>(); time_on_level = time_on_level.GetComponent <Text>(); resultCanvas.enabled = false; time_1.enabled = false; timer = timer.GetComponent <Text>(); added = 0; }
// Use this for initialization void Start() { shooting = GetComponent <Shooting2>(); anims = GetComponent <Animator>(); anims.SetFloat("flying", 2); body = GetComponent <Rigidbody2D>(); }
private void Start() { shooting2 = shooting2.GetComponent <Shooting2>(); clickingArea = clickingArea.GetComponent <ClickingArea>(); startSpeed = speed; startJumpForce = jumpForce; startingScale = transform.localScale; fliperScript = GameObject.Find("Player").GetComponent <FliperScript>(); anim = GetComponent <Animator>(); body = GetComponent <Rigidbody2D>(); body.fixedAngle = true; movingjoystick = movingjoystick.GetComponent <MovingJoystick>(); jumpingButton = jumpingButton.GetComponent <JumoingButton>(); }
Shooting2 script; //スプリクトを入れる変数名 // Use this for initialization void Start() { player = GameObject.Find("Player"); //プレイヤーの中に入っている、 script = player.GetComponent <Shooting2>(); //Shooting2スクリプトを読み込む。 // script.bullet_Count++;//弾が出たらカウントを1追加する }
// Use this for initialization void Start() { shooting2 = shooting2.GetComponent <Shooting2>(); }