private void Awake() { if (instance != null) { if (instance != this) { DestroyImmediate(gameObject); return; } } instance = this; }
private void Update() { if (distanceFromFlautist < GameManager.Instance.playerRange && !follow) { loopsfx.enabled = true; if (Input.GetMouseButtonDown(1)) { follow = true; target = playerTransform; EnchantingSfxPool.PlaySfxOnPosition(transform.position); } } }