void Attack() { BulletRock clone = Instantiate <BulletRock> (bullet, transform.position, Quaternion.identity); clone.Init(spriteRenderer.flipX ? Direction.left : Direction.right); }
void FastAttack() { BulletRock clone = Instantiate <BulletRock>(bullet, transform.position, Quaternion.identity); //BulletRock bulletRock = clone.GetComponent<BulletRock>(); clone.Init(10); clone.InitDirection(spriteRenderer.flipX ? BulletRock.Direction.left : BulletRock.Direction.right); }
void FastAttack() { BulletRock clone = Instantiate <BulletRock> (bullet, transform.position, Quaternion.identity); clone.Init(10f); }