float speed = 6; // 移動スピード void Start() { this.rb = GetComponent <Rigidbody2D>(); sb = FindObjectOfType <SubBoss1>(); hp = FindObjectOfType <HP>(); sb.playerAttack = true; if (right) { run = -1; } else { run = 1; } rb.velocity = new Vector2(run * speed, rb.velocity.y); hp.HPdamage = true; }
void Start() { player = FindObjectOfType <PlayerBoss>(); posC = FindObjectOfType <BossPosition>(); sb = FindObjectOfType <SubBoss1>(); }